Remove complex and imaginary types?

Georg Wrede georg at nospam.org
Tue Jan 8 22:29:52 PST 2008


Don Clugston wrote:
> Georg Wrede wrote:
> 
>>> Getting rid of them will release 6 keywords, and make the core 
>>> language simpler.
>>
>>
>> Now, this is the one subject that gets me downright ballistic. During 
>> the (some six) years I've been a part of D, I have constantly had a 
>> problem with this keyword number issue.
> 
> 
>> As a result of this all, I'm definitely of the opinion that "one concept
>> warrants one word", and that "the same word for different purposes is
>> poison", and that "the same concept with different words is poison".
>>
>> (Do I have to say "const", anybody???")
> 
> There's a funny thing about this situation. Here's the background:
> * I argued (on the ng) against overloading the 'enum' keyword to mean 
> manifest constants.
> * Andrei emailed me, basically saying that we need to keep the keyword 
> count down.

This should NEVER be an isolated goal. Rather, it should just be the 
natural result of good language design. And only that.

BASIC and Brainf**k have fewer keywords than D, but I wouldn't call them 
better than D.

> * I responded that if we want to get the keyword count down, an obvious 
> way to do it would be to remove the pure imaginary types.
> * Andrei discussed this with Walter.
> 
> Essentially, I don't think that pure imaginary types belong in the 
> language (not even in a standard library). And getting rid of them would 
> be great news for those who care about keyword count.
> 
> The complex types are different; the _only_ reason you'd remove them is 
> to reduce the keyword count. That's a completely different issue.

Of course, the fewness of keywords can be perceived as a measure of good 
language design. But decreasing the number of keywords artificially 
doesn't make any language better.

"Have as few keywords as practical, but NO fewer than that!"



More information about the Digitalmars-d mailing list