Does D have too many features?

Timon Gehr timon.gehr at gmx.ch
Sat Apr 28 13:57:33 PDT 2012


On 04/28/2012 09:22 PM, Dmitry Olshansky wrote:
> On 28.04.2012 22:47, Walter Bright wrote:
>> Andrei and I had a fun discussion last night about this question. The
>> idea was which features in D are redundant and/or do not add significant
>> value?
>>
>> A couple already agreed upon ones are typedef and the cfloat, cdouble
>> and creal types.
>>
>> What's your list?
>
>
> 1. Drop is(...) feature entirely. Extend __traits where needed and move
> compile-time reflection to "magic" meta namespace completely.
>
> 2. "enum as manifest constant". Use static or immutable/global.

static is not accessible at compile time, would you want to change that?
immutable is not an option because it infects the type.

Furthermore, I like 'enum' because it is concise.

What is the issue with enum?

> Compiler should be smart enough

Smart compiler fallacy. It really cannot be that smart in this case.

> to avoid putting immutable integers/doubles into
> object file as variables.
>

Their address might be taken by code that is unavailable! Furthermore, 
many of my enums are strings or arrays.

> 8. Something else. D is huge :)
>

I actually think D is not too large.


More information about the Digitalmars-d mailing list