does D already have too many language features ?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Apr 12 09:30:48 UTC 2019


On Monday, 8 April 2019 at 22:49:10 UTC, bachmeier wrote:
> On Monday, 8 April 2019 at 18:59:25 UTC, Abdulhaq wrote:
>> The problem with AST macros, and Walter seems to agree with 
>> this POV, is that every medium to large project will have its 
>> own private language that ripples throughout the code. Only a 
>> few of the developers will really understand this new language 
>> and how it can safely be used and where its pitfalls are. It 
>> will be poorly documented and a nightmare for new developers.
>
> That's a valid criticism. It's also odd coming from a language 
> like D where "good code" is generic on steroids and extremely 
> hard to work with. I've been using D for six years and still 
> struggle to use Phobos at times.

It can be countered by culture. Python is very flexible in what 
you can do, yet there is a culture that gives preference to 
libraries that are somewhat consistent with the standard library.

Anyway, AST macros should not be available on the "application 
layer", only on the "library layer".

The real problem with AST macros is that you need a minimal base 
language that is really solid. And you cannot modify that base 
language after release. (you can do it in a later major version, 
but you cannot automatically upgrade library code written for the 
previous version)

It would be a completely different philosophy to what you have 
now. It would be on the other side of the spectrum in some ways.




More information about the Digitalmars-d mailing list