[Issue 9857] UFCS for struct opCall

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 2 23:15:56 PDT 2013


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



--- Comment #12 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-04-02 23:15:54 PDT ---
(In reply to comment #8)
> Some tried to claim that TDPL said that it was in the language, but
> all TDPL ever talked about was arrays, because that's all that there was and
> all that was planned for. The only reason that it was ever expanded beyond
> arrays was because people kept asking for it.

That's complete BS. Read the fine-print, it clearly says on page 156:

"If a.fun(b, c, d) is seen but fun is not a member of a's type, D rewrites that
as fun(a, b, c, d) and tries that as well."

It doesn't matter that the page talked about arrays beforehand. It says right
there "a's type", it doesn't say "array type".

But note that it also says:

"The opposite path is never taken: if you write fun(a, b, c, d) and it does not
work, a.fun(b, c, d) is not tried"

So this could be interpreted against this enhancement request, although TDPL
has been made wrong before..

> But it _has_ been months (probably over a
> year now, though I'm not sure)

The oldest changelog entry I can find about UFCS is for version 2.055, which
was released Sep 4 2011, and this is for a bug that was filed March 03 2011. 

And the oldest UFCS bug was filed in 2006: Issue 662 We've had UFCS for years.

It's been a feature years in the making, it should have documentation by now.

-- 
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