DIP23 draft: Fixing properties redux

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Feb 4 07:15:16 PST 2013


On 2/4/13, kenji hara <k.hara.pg at gmail.com> wrote:
> This is not correct."m.s & m.s" is always parsed as binary bitwise AND expression.
> So there is no address expression.

Fantastic, more special casing. I don't think you guys realize what a
mess you would introduce. Basically:

s & s;  // fine, they're binary operators
&s;  // oops, doesn't work even if property returns a type with a unary operator

On 2/4/13, kenji hara <k.hara.pg at gmail.com> wrote:
> Address expression is _only_one_ built-in feature to make a callable object
> from function symbol. So
> this "special feature" is enough reasonable to me.

Yes "only one". And then later we'll add another "one", and another
one, until we end up with the mess that is C++. This feature does not
pull its own weight regardless of how easy it is to implement in the
compiler. From a user's perspective, it is completely pointless and
unintuitive.


More information about the Digitalmars-d mailing list