Remove complex and imaginary types?

Gilles G. schaouette at free.fr
Sat Jan 12 01:50:48 PST 2008


You could just express "float km" like this: (5.8f)km.


renoX Wrote:
> 
> I like a lot all those proposal for adding suffix based literal, but I'm 
> afraid that these could interfere(sp?) with the ones already existing in 
> the language, so I wonder if 'library added' suffix shouldn't have an 
> operator to distinguish them for the language one.
> 
> I'm thinking about the underscore '_': 5.8f_km would be replaced by 
> km(5.8f), if there is no operator, there are some risk of ambiguity: 
> "5.8fm" is-it 5.8f meters or 5.8 femtometers?
> 
> With 5.8f_m and 5.8_fm you remove the ambiguity and the _ is visually 
> 'pleasing' so this syntax would still be used.
> 
> Regards,
> renoX
> 
> 
> 
> 




More information about the Digitalmars-d mailing list