It's time we stopped treating languages as sacred fixed objects. We need now, more than ever, languages we can change.
36 comments
LLMs may make this overhead less visible to you, but surely it's still there? I'd rather more of my tokens went towards solving the actual task at hand, vs figuring out a custom syntax (and re-learning it on every fresh context window).
The patterns that macros express are still there in the codebase, usually via uncompressed repetition.
You would need to learn the pattern regardless if you used a macro or not, and a macro at least formally codifies the repetition.
Indeed, one can make bad abstractions, or messy extensions to the macro, but that's true of functions or classes just as much.
Not supporting macros seems to me as an arbitrary limitation put in place as a stop gap for a symptom with a different root cause. (I.e. removing expressive power to solve poor engineering or immature macro tooling).
It's definitely easier to mess things up with macros, but it's also easier to mess more up the higher up you go in any abstraction ladder.
Now that I'm writing this comment, the very fact that we have to distinguish a macro vs regular code feels like a design smell to me.
Functions should operate on data or code, and controlling when it applies, comp time, run time, or some JIT, should be a separate lifecycle configuration detail, or decoupled in a different manner.
I guess this will become the frontline of the upcoming civil war in programming-land...
It's starting with the exception before you even had a chance to understand the rule.
> by default, variables are immutable
Well, since the name is a "variable", it must by default be mutable. Otherwise it is an exception being forced to become a standard case.
I didn't really find the argument convincing the first time and I don't really find it convincing now.
That said, with regards to macros, I actually do agree that the fear against them is broadly overblown. I have seen scary terrible horrifying macro soup in Clojure, but that has generally been outlier cases. Something like core.async abuses the hell out of macros, and despite that I think it very often increases readability and understanding of the language.
It's going to be a hard come-to-Beevis moment if the magic signal goes away and people have to remember celestial navigation.
Not sure you can even find a sextant on most vessels.
So too these AI services.
Sure, LLM coding agents being capable doesn't mean we can ignore fundamentals.
But LLM coding agents surely adjust the cost/benefit considerations for all kinds of programming efforts.
Arranging your code in such a way that it's so complicated you need an LLM to understand it is surely silly.
Using an LLM to write a macro because you weren't going to learn how to write macros and deal with all the subtle cases? I think that's arguable.
Read the full thread on Hacker News →
Related stories
- Hacker News · 2 points · 8 days ago
- DEV Community · 6 points · 6 days ago
- Hacker News · 1 points · 9 days ago
- Hacker News · 3 points · 7 days ago
- Hacker News · 1 points · 9 days ago
- Deodands put a price on objects that caused deathdaily.jstor.orgHacker News · 91 points · 14 days ago