Remove complex and imaginary types?
renoX
renosky at free.fr
Sat Jan 12 03:35:06 PST 2008
Janice Caron a écrit :
> On 1/12/08, renoX <renosky at free.fr> wrote:
>> I'm thinking about the underscore '_': 5.8f_km would be replaced by
>> km(5.8f),
>
> Why not the asterisk? Oh wait! - We already /have/ that functionality!
>
> 5.8f*km
>
> is replaced by
>
> km.opMul_r(5.8f);
>
> Seems to me that nothing new is needed.
Because
1) when we write physic equation we don't write "5.0 x km" (x being the
multiplication sign) but "5.0 km" so it would be nice if the language
supported a way to make similar notations.
2) this could makes unneeded additional multiplication.
3) When you write "5km" you don't mean 5 * 1km but km(5), but sure most
of the time it's the same..
Regards,
renoX
More information about the Digitalmars-d
mailing list