Properties no longer work?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Jul 27 17:43:08 PDT 2006
"BCS" <BCS at pathlink.com> wrote in message
news:eabg5b$1h47$6 at digitaldaemon.com...
> I'd leave it. It would be more consistant.
>
> FunctionPointer ::= "&" FunctionSpecifier;
> FunctionSpecifier ::= FunctionIdentifier [ OverloadResolver ]
> OverloadResolver ::= ["." "(" TypeList ")" ]
>
> vs.
>
> // "&" befor OR resolver after, Hmmm.
> FunctionPointer ::=
> "&" FunctionIdentifier |
> FunctionIdentifier OverloadResolver;
> OverloadResolver ::= ["." "(" TypeList ")" ]
I think we could just skip the "&ident" form and make it required to use the
"ident.()" form instead. So the only way to get a function pointer would be
to use the overload resolve exp.
> It would still leave that problem.
Ah, I see; yeah, there'd be the problem if the "&ident" form were allowed,
since it could be a property call (damn D "properties"). Get rid of that,
though, and there's _no_ ambiguity ;)
> Thinking about it the "Ident . ( Types )" syntax looks good.
My rationale for it was that it's kind of selecting a member. "ident"
declares a sort of namespace of functions with the same name, and you select
the correct overload as if it were a member of that namespace.
More information about the Digitalmars-d-learn
mailing list