Arbitrary abbreviations in phobos considered ridiculous

Brad Anderson eco at gnuk.net
Fri Mar 9 15:30:11 PST 2012


On Fri, Mar 9, 2012 at 4:24 PM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:

> On Friday, March 09, 2012 16:08:34 Brad Anderson wrote:
> > On Fri, Mar 9, 2012 at 3:56 PM, Jonathan M Davis <jmdavisProg at gmx.com
> >wrote:
> > > On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote:
> > > > I'll say I *don't* agree with the rejection of aliases on principle
> --
> > > > aliases can be extremely useful/helpful, and they cost literally
> nothing
> > > > (the "cognitive cost" on the docs is a BS argument IMO). I just don't
> > > > agree with consuming so many common symbols for the sake of sugar.
> > >
> > > aliases need to have a really good argument for existing. If UFCS is
> fully
> > > implemented, then I think that there is _some_ argument for having
> stuff
> > > like
> > > hours and minutes, because then you can do stuff like 5.seconds()
> (though
> > > honestly, I really don't like the idea). The alias enables different
> > > usages
> > > rather than simply being another name for the same thing.
> >
> > What remains on UFCS? I've heard someone (Nick?) say he'd like it to
> match
> > static member functions too. I haven't tested but it seems like
> > 5.seconds() should work ever since Kenji's pull request was merged a
> couple
> > of days ago (thanks Kenji and Walter, I'm really looking forward to that
> > change).
>
> I don't know what the current state of UFCS is. I know that Kenji has been
> working on it and that at least some portion of it has been checked in, but
> what exactly it enables at this point, I don't know.
>
> - Jonathan M Davis
>

Here are the unittests he added if you are curious about what currently
works in dmd HEAD:
https://github.com/D-Programming-Language/dmd/blob/master/test/runnable/ufcs.d

The issue "[tdpl] Implement uniform function call syntax" <
http://d.puremagic.com/issues/show_bug.cgi?id=3382> is marked as RESOLVED
FIXED so, as far as I know, UFCS is done (ignoring the inevitable bugs that
will eventually be uncovered).

Regards,
Brad Anderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120309/e150ada9/attachment.html>


More information about the Digitalmars-d mailing list