[Issue 9857] UFCS for struct opCall

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 2 14:06:45 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9857


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #7 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-04-02 14:06:44 PDT ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> > I'd even like typeof() to be usable with that trailing syntax, like sizeof, see
> > Issue 4272
> 
> The U of UFCS means universal. And ctors too are functions.

Well it probably stands for uniform, but I guess both are true.

> auto b1 = 20
>           .iota
>           .map!(_ => digits[uniform(0, $)])
>           .array
>           .BigInt;

That looks great.

> So it's expected.

I don't have a problem with the feature (it actually looks great with the ctor
example you gave there), but it's hard to say what's expected when there's ZERO
documentation for UFCS in the spec, which is ridiculous since we've had this
feature for the last several years and it has just expanded in functionality
ever since. Even TDPL barely talks about UFCS, and calls them "pseudo members".

I really wish people who implement language features spent 10 minutes of their
time writing documentation about it. As it stands, it seems only compiler
hackers seem to know what language features actually exist and are expected to
work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list