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

There are certainly good reasons why lisp is the way it is. I dislike reading that style of code, though. I don't like how you have to read it in a strange sort of top-to-bottom-but-also-inside-out way (really this happens in all languages but it's especially bad in lisp because there are no infix operators and so forth), and of course the common gripe about all the parens.

And to be honest, I am not really interested in how hard it is to write a compiler for the language I use.



Clojure has a threading macro built in (http://clojuredocs.org/clojure.core/-%3E) which lets you write code like :

    user=> (-> "a b c d" 
               .toUpperCase 
               (.replace "A" "X") 
               (.split " ") 
               first)
It is trivial to write the macro in other Lisps.


This is one of the nicest macros - chaining with sane return semantics and no overhead/boxing required. Breaks my heart trying to replicate it.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: