Bug 3999 and 4261

so so at so.do
Wed Sep 1 13:50:04 PDT 2010


> Float (short for "floating point"): The decimal point can "float" around  
> as
> the value changes (not a literal use of "float", but there's nothing  
> wrong
> with metaphoric uses of words, even in ordinary speech). This type is  
> named
> in contrast to the fixed-point arithmetic that was often used as an
> old-school optimization (where the decimal point was always at a fixed
> location, for example, the high 16-bits may have been the whole-number  
> part,
> and the low 16-bits may have been the decimal part).
>
> Double: This one's easy: It's double the size of a float.
>
>

I know what they are, but at the same time was expecting you to get the  
point :)

When you need a compile-time type in C/C++ mostly you don't need a type,  
just :
enum { value = 10 }; // Also, this is suggested over const

Coming from C/C++ enum constants are pretty straightforward as  
compile-time constants.
And please, it is only 4 letters. (In case you missed, they are e, n, u,  
m. They are the 4 best looking
characters on every editor!)

This reminds me the "retro" case, where most argue against and making up  
names such like reverseAndSomeOtherUglyNonsense.
Anyone here got trouble understanding what "enum" is and what it does? No,  
It wasn't the case in retro either.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list