Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review

welkam wwwelkam at gmail.com
Tue Jun 28 13:17:44 UTC 2022


On Tuesday, 28 June 2022 at 11:08:50 UTC, max haughton wrote:
> It may also be of note that this pattern is already widespread 
> in idiomatic D code in the form of shortened function literal 
> expressions.

Thats a strange way to say that this is similar to lambda syntax/ 
its the same pattern.

> I have no response to the point about AST macros, it doesn't 
> seem particularly relevant to the DIP.

What AST macros do is they create dialects of the language. Each 
project that uses them have different "feel" to them and even if 
you are an expert in that language you would still need to learn 
the dialect of the project before you could understand what the 
code does. This DIP "pushes" us in the same direction but with 
smaller "force".

Go was designed by a very senior programmers to be simple for a 
reason. They wanted to prevent junior programmers from writing 
"clever" code. They made the language the way it is so all code 
could be easily understood by anyone. Simplicity has a value.

Many very senior developers choose to start new project in C 
because it is simple.

In programming languages there are negative aspects of allowing 
to do the same thing in different ways.


More information about the Digitalmars-d mailing list