4 ms·
> partial evaluation (comptime) as a single coherent mechanism that replaces a myriad of other partial-evaluation mechanisms (macros, templates/generics, conste
by nialv7 6d ago
> partial evaluation (comptime) as a single coherent mechanism that replaces a myriad of other partial-evaluation mechanisms (macros, templates/generics, constexprs).
So sad dlang never gets the credit it deserves. None of these ideas in zig are novel.
- abainbridge 6d agoYes. I don't really understand why Zig gets more attention than dlang. It seems that it is more to do with the personality of the authors, rather than the technicalities. I get the impression that Walter is more laissez-faire, while Andrew is more single-minded. I'm grateful to the contributions both have made.
- laxd 6d agoPardon any corruption in my memory. But I think D in it`s early days had non-optional garbage collection. Which seemed like a bad choice at a time when I think many of us wanted a better C, not a more inconvenient C#. Then they made garbage collection optional, which split the ecosystem into garbage collected and manual libraries. Not a great choice either. Then there was a drama and split because of two competing standard libs. And also the compiler was closed source which turned some people of in a time where open source compilers had become an expectation. So all in all, some wrong turns made it lose momentum and I don`t think it can recover in todays climate.
- pron 6d agoFor me it's because Zig presents a novel and even revolutionary new coherent design for low-level programming, whereas D is mostly a collection of many ideas, many of them are good, but they don't coalesce into a simple design philosophy. I think somebody once said that good (or coherent) design is what happens not when there's nothing left to add but when there's nothing left to remove. That product X has all the components of product Y and possibly more doesn't mean that it contains within it Y's design. The novelty of the iPhone wasn't that it had a touchscreen, but that it had little else. Such a coherent design grabs, and deserves, attention. For example, another language that immediately grabbed my attention (aspirationally; I haven't looked at it closely yet) is https://github.com/aardappel/goose/ https://github.com/aardappel/goose/. That's not because it has arenas, but because it doesn't have anything else.
- pron 6d agoIt is entirely novel. As I wrote, what makes the design revolutionary isn't the partial evaluation mechanism itself, but how the language is organised around it. It's like what made the iPhone's design revolutionary wasn't that it had a touchscreen, but that it didn't have a keypad. Partial evaluation mechanisms aren't very interesting in themselves; what's interesting is building a language around a unified partial evaluation mechanism and little else. But yes, D gets credit for adding more partial evaluation features.
- estebank 6d ago> None of these ideas in zig are novel. Few ideas are new under the Sun. But the inventor and the popularizer are rarely the same. We should be happy that the ideas got more exposure instead of litigating novelty.