News for hackers. Stuff that matters.
Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:02AM (#28338593)
Rocket materials don't ultimately compile down to the same material though. This makes the analogy somewhat flawed. Also, if a novel language feature is useful enough, it's often stolen by the competition.
Re:Weird Languages by ovis on Saturday August 28, 2021 @11:32AM (#28338831)
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.

Re:Weird Languages by Shorel on Saturday August 28, 2021 @02:06PM (#28340112)
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.

Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:36AM (#28338866)
Yes, I read that, but I don't know Lisp well enough to evaluate the claim.
Re:Weird Languages by klyrs on Saturday August 28, 2021 @12:46PM (#28339432)
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(...)