disabling unary "-" for unsigned types

bearophile bearophileHUGS at lycos.com
Sun Feb 14 15:12:25 PST 2010


Walter Bright:
> D is a very ambitious language, and we are definitely shooting for the 
> stars with it. That means that there are many features that missed or 
> otherwise failed to find a target. So we're doing a little pruning for 
> D2, and a big part of posting these possible prunes here is to make sure 
> we aren't missing an important use case for them.

D2 is a mix of some different kind of features:
- C features. Some of them are not perfect, but we know their ups and downs, their risks and their qualities.
- Some features are patches/fixes over C features that are known to be dangerous, not handy, bug prone, etc. Walter has enough experience with C that they are probably all good things.
- Some new features that come from years of D1 development/usage or from other languages. They are not perfect (for example you can by mistake put the underscore in a wrong place in a number literal, and this can produce a deceiving number. Ideally in base 10 underscores can be syntactically allowed only every 3 digits and in base 2 or 6 every 4,8,16,32,16 digits only), but they are generally known enough to be safe enough bets.
- And finally in D2 there are several new features that are sometimes only half-implemented, and generally no one has tried them in long programs, they seem to come from just the mind of few (intelligent) people, they don't seem battle-tested at all. Such new features are a dangerous bet, they can hide many traps and problems. Finalizing the D2 language before people have actually tried to use such features in some larger programs looks dangerous. Recently I have understood that this is why Simon Peyton-Jones said "Avoid success at all costs" regarding Haskell, that he has slowly developed for about 15 years: to give the language the time to be tuned, to remove warts, to improve it before people start to use it for rear and it needs to be frozen (today we are probably in a phase when Haskell has to be frozen, because there is enough software written in it that you can't lightly break backward compatibility).

So I am a little worried for some of the last features introduced in D2. I don't know if D3 can solve this problem (maybe not).

Bye,
bearophile



More information about the Digitalmars-d mailing list