Jeremie Pelletier wrote:

> Nick Sabalausky wrote:
>> union A {
>> int foo;
>> float bar;
>> }
>> 
> 
> Yet it's the only way I know of to do bitwise logic on floating points
> in D to extract the exponent, sign and mantissa for example.

You could add built-in methods for those operations to the float type:

float bar;

boolean s = bar.sign;
...

Union is very flexible, but unfortunately it's also one of the features that 
can break the type safety in D.

Reply via email to