Things that may be removed

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Dec 22 08:55:27 PST 2008


Don wrote:
> bearophile wrote:
>> There are some things I'd like to see added to the D language, but 
>> what things can be removed from it?
>>
>> "Perfection is attained, not when no more can be added, but when no 
>> more can be removed."
>> -- Antoine de Saint-Exupéry.
>> :-)
>>
>> "There should be one-- and preferably only one --*obvious* way to do it."
>> -- Python Zen, emphasis added by me :-)
>>
>> Bye,
>> bearophile
> 
> That is an excellent question.
> Some items in my list are controversial, the first two have already been 
> mentioned.
> 
> * C-style declarations
> * SFINAE
> * \n, \r as a string (free up the backslash character)
> * #line (make it a pragma instead)
> * Octal (it's not 1952 any more)
> * the comma operator (allow in selected places, eg for(; ;++a, ++b)).
> * package. In DMD, it's a broken implementation of a broken concept.
> * The postincrement and postdecrement operators (make x++, x-- identical 
> to ++x, --x, except that it is illegal to use the return value. Allowing 
> operator overloading of the postfix operators was a silly hack in C++. 
> It's a freedom nobody wants).
> * is() expressions (I love what you can do with it, but it's 
> unintuitive, and traits is a much better solution)
> * .sort for AAs.
> * Object.toString(). Encourages bad design. It's not powerful enough to 
> be useful.

This looks like a pretty darn good list. Could you give detail on what's 
wrong with #line (lack of minimalism I suppose?) and how you'd replace 
obj.toString? Also, is() is a built-in thing so traits can't do all it does.


Andrei




More information about the Digitalmars-d mailing list