initialization immutable array

monarch_dodra via Digitalmars-d digitalmars-d at puremagic.com
Fri May 16 08:26:26 PDT 2014


On Friday, 16 May 2014 at 08:43:31 UTC, bearophile wrote:
> monarch_dodra:
>
>> UFCS iota :puke:
>
> I think UFCS iota is acceptable when it has only one argument:
>
> myArray.length.iota...
>
> Bye,
> bearophile

My gripe is how "incompatible" 1-arg and 2-arg iota is w.r.t. 
UFCS:

0.iota(4);
4.iota();

That's also why I've stopped using "writeln()" as UFCS: It 
"looks" convenient at first, but then you want to turn those 
"writeln" into "writefln", and that's when things don't go 
according to plan...


More information about the Digitalmars-d mailing list