|
|
|
|
|
by hacker_9
3334 days ago
|
|
Imagine the power of your whole programming language available to you at compile time. That is a Lisp macro. It gives you the ability to write simple and elegant code, which can then be compiled down into the unreadable nasty code after, while still being as fast as if you wrote the nasty code by hand. Another term for this is zero-cost abstraction. What is nice in Lisp is you can also use the (macroexpand ) function to see what Lisp code will actually be generated.. it's Lisp all the way down! If you look at the Servant library [1] for ClojureScript, they wrapped the callback-hell mess that is Javascript web workers (read: the only way to actually multi-thread on the web), into beautiful Go-style channels, via the use of macros. [1] https://github.com/MarcoPolo/servant |
|
This can be true in C++ as well, but those limits are quite high and are easily set to something else. Perhaps Clojure also allows you to reset what these limits are.