DIP19: Remove comma operator from D and provision better syntactic support for tuples

deadalnix deadalnix at gmail.com
Sun Sep 23 14:27:26 PDT 2012


Le 23/09/2012 22:40, Andrei Alexandrescu a écrit :
> I discussed this with Walter, and we concluded that we could deprecate
> the comma operator if it helps tuples. So I started with this:
>
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP19
>
> Unfortunately, I started much cockier than I ended. The analysis in
> there fails to construct a case even half strong that deprecating the
> comma operator could significantly help tuples. Well it essentially
> concludes that tuples are mostly fine as they are, and attempts to
> embellish them syntactically are marred with unexpected problems.
> Nevertheless, I sure have missed aspects all over, so contributions are
> appreciated.
>
>
> Thanks,
>
> Andrei

This is a problem I think about for a while, and coding for SDC + 
studying how it is done in other languages has enlightened me on some 
points.

I all for deprecating the comma operator. You have my full support on 
that point. As well as you have it for the « for » construct update.

However, I'm not sure about everything you propose to implement tuples. 
I could discuss idea about 1 element tuples, or other tricky cases that 
deserve discussion (and I'm sure they will).

But first, let me digress. D is already a really good language. One of 
its main flaw is the lack of 3rd party tools. The way new feature are 
implemented is a real problem for 3rd party tool developers. In other 
terms, the arm done by adding new feature is greater than any benefit 
new feature can bring us.

Additionally, we have some open mess that need to be closed. Think about 
the -property madness, the holes in const/immutable transitivity, or 
other half buggy features.

I consider that , operator should be deprecated then removed ASAP. It 
will limit the amount of code possibly broken in the future.

But let's not introduce any new feature before at least introducing a 
versioning scheme that allow user to keep the version without the feature.


More information about the Digitalmars-d mailing list