UFCS syntax I never saw before.

ANtlord antlord92 at gmail.com
Mon May 21 14:00:55 UTC 2018

On Monday, 21 May 2018 at 11:38:12 UTC, SrMordred wrote:
> After all this time I saw this:
> writeln = iota = 5;
> what??
> I never saw that before!
> This is interesting, there is something useful that i can do 
> with this kind of call?

What the hell is this? I don't figure out why are there so many 
syntax features? It doesn't make the language more easier. Is it 
any reason to support 2 additional cases of function calling? We 
have no literal for a tuple but we call a function via 3 cases. 
I'm frustrated.

D has a lot cool features, I like D, but that is one of those 
which make me doubt the language future. I don't play a big role 
in the project but I talk to all my python co-workers: "You 
know... so there so cool language, it's called D. It can do this 
and that... It supports convenient static typing so you 
definitely know what happens in a piece of code.". But something 
like this make doubt about what happens in a piece of code. There 
is static typing so I know that type a variable has, but I look 
at a method calling and I ask: "Is it data field? No. Is it 
property? No. Is it method? No. It's UFCS! Okay." And now I see 
that UFCS can works the same way as a property!

More information about the Digitalmars-d-learn mailing list