UFCS and constructors
monarch_dodra
monarchdodra at gmail.com
Tue Jul 2 07:57:09 PDT 2013
On Tuesday, 2 July 2013 at 12:46:42 UTC, Timon Gehr wrote:
> On 07/02/2013 09:35 AM, monarch_dodra wrote:
>> which looks *very* confusing when written that way.
>>
>
> I disagree, even though the example appears to be specifically
> designed to confuse. Actual usage looks like this:
>
> import std.stdio, std.bigint
>
> void main(){
> writeln(2.BigInt ^^ 123456);
> }
Yeah... tailored for confusion... that could be the biggest issue
actually:
I always get surprised when arrays are 1 item initialized, and
even more so when done in a struct via aggregate initialization.
I'd say *that* was actually the bigger culprit in my example, and
the one that lead to my confusion, which I then blamed (or
"called wolf") on UFCS "If it wasn't for UFCS, that would have
been turned down!" UFCS actually had nothing to do with it. :(
Well, thanks for the explanation and debunk.
More information about the Digitalmars-d
mailing list