Reimplementing the bulk of std.meta iteratively

claptrap clap at trap.com
Tue Sep 29 09:07:39 UTC 2020


On Tuesday, 29 September 2020 at 03:14:34 UTC, Andrei 
Alexandrescu wrote:
> On 9/28/20 6:46 PM, Bruce Carneal wrote:

> Years ago, I was in a panel with Simon Peyton-Jones, the 
> creator of Haskell. Nicest guy around, not to mention an 
> amazing researcher. This question was asked: "What is the most 
> important principle of programming language design?"
>
> His answer was so powerful, it made me literally forget 
> everybody else's answer, including my own. (And there were no 
> slouches in that panel, save for me: Martin Odersky, Guido van 
> Rossum, Bertrand Meyer.) He said the following:
>
> "The most important principle in a language design is to define 
> a small core of essential primitives. All necessary syntactic 
> sugar lowers to core constructs. Do everything else in 
> libraries."

I agree with pretty much all of what you've just said FWIW.

However...

How do you decide what is an essential language primitive? Or 
what is necessary syntactic sugar? I mean syntactic sugar almost 
by definition isnt necessary, it's just window dressing.

It could be argued that compile time first class types is an 
essential primitive for meta-programming?



More information about the Digitalmars-d mailing list