ufcs and integer params

Timon Gehr timon.gehr at gmx.ch
Mon Jul 16 16:13:55 PDT 2012


On 07/16/2012 10:55 AM, Chris NS wrote:
> Having been around long enough to remember when the ability to call
> "foo()" as "foo" first appeared, I feel it necessary to point out that
> this was *not* in fact a deliberate design, but rather a sort of
> "accident" that arose out of D's first attempt at properties.

Afaik this first attempt was implemented roughly as designed. It is my
understanding that @property was added later in order to fix the
introduced ambiguities.

> It was the same "accident" loaded compiler release that gave us pseudo-members --
> the precursors to UFCS.
>

I still wonder how that could possibly happen.

> The community discovered that these things were accepted by the compiler
> -- which was actually against the language spec at the time -- and
> further that the resulting code did the intuitively correct thing.
> Response to the "accidents" being generally positive, it was decided to
> work toward making them legitimate language features. Some flavor of
> @property (or of a certain other proposal which was a mimicry of C#
> properties... I was in that camp)

That would certainly be more pretty -- OTOH it is hard to think of a
way to extend this to UFCS that is as natural as what happens if
everything is conflated in functions.

> has been in the plan ever since.
>
> I find the ongoing debate/discussion of @property and -property to be...
> well, moot. But hey, I'm just one crazy among an army of crazies.
>

Well, this newsgroup has the property that the stuff that is actually
important is usually unilaterally agreed upon rather quickly. :o)


More information about the Digitalmars-d-learn mailing list