Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What did you do recently?


To add to that question ... how did you use pattern matching to replace the composability of car/cdr?


My new Lisp dialect is https://github.com/darius/squeam (and as it says, I'm not wishing it on anyone else).

Pattern matching would replace a call like cadar with a pattern like ((_ x @_) @_). Using cadar is sort of like point-free style in Haskell: they both invite you to mentally run a chain of operations to understand the meaning, in contrast to patterns and expressions with named variables, which are more like a picture of the input and output.

Of course pattern matching goes way back, but I used to think of it as less settled -- people might want to extend the kernel language with pattern matching in many different ways. Now I'd be more surprised by a new Lisp without some sensible default; plus if it is absent, you can add it in under a page of code, like http://okmij.org/ftp/Scheme/macros.html#match-case-simple


Thank you for sharing your work. I could see some good use out of it.


I hope it does become useful, thanks! So far it's more of a hobby.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: