On Thursday, 8 September 2016 at 08:56:13 UTC, Russel Winder wrote:
What is the idiomatic way of having an array with a mix of int and float data?

Maybe https://dlang.org/phobos/std_variant.html#.Algebraic ?

Is relying on automated conversion of int to float acceptable?

I don't think so:

import std.stdio;

void main()
{
        int i = 12345678;
        float f = i;
        writeln(f);
}

Andrea

Reply via email to