Number literals (Was: Re: Case Range Statement ..)

bearophile bearophileHUGS at lycos.com
Tue Jul 7 18:42:03 PDT 2009


Andrei Alexandrescu:
> Anyway, I think this feature is thoroughly useless. An adage says that 
> the only numeric literals in a program should be 0, 1, and -1. How many 
> big integer literals can you think of right now?

OK, let's forget big integer literals for now :-)

I agree that there are bigger fishes to talk about. For example  I may like some things present in Delight, like especially this one (already discussed in the past, of course):
http://delight.sourceforge.net/null.html

Smaller things in Delight:

Good to have:
- An important difference between D and Delight is that a Delight array is considered true if and only if its length is non-zero:

I like:
- Also, D allows null to be used to mean an empty array. In Delight, you can only use [].

Improvements in the imports:
- Import all symbols into our namespace:
import example.utils: *
- Import a module, accessed by its full name:
import dlt.io
void sayHi(dlt.io.Printer p): ...

Bye,
bearophile



More information about the Digitalmars-d mailing list