Hacker News new | ask | show | jobs
by ovis 1756 days ago
From the article,

> [Lisp macros] by their nature would be hard to implement properly in a language without turning it into a dialect of Lisp

Other candidates that come to mind (because I recently learned about them) are effect systems, like in Koka.

2 comments

Mixin macros in D are just about as powerful, and D is not a dialect of lisp.

The main difference is: mixins are compile-time only, you can't add them to a running system like in Lisp.

In practice, it is a much smaller difference than it looks like.

Yes, I read that, but I don't know Lisp well enough to evaluate the claim.
I'd highly recommend learning lisp and writing some higher-order functions with macros. You start with an instance of a lower-order function, insert a few backticks and commas where appropriate, wrap that in a defmacro, and boom, you're a metaprogrammer. You can certainly do similar stuff in other languages, but it's almost always a cludge.

The rest of lisp is pretty easy if you've done any sort of functional programming, and view the code through a lens that translates (foo ...) to foo(...)