Revised RFC on range design for D2
Jason House
jason.james.house at gmail.com
Sun Sep 28 10:41:37 PDT 2008
Andrei Alexandrescu wrote:
> I think we all agree that there are some annoyances related to the whole
> property business, among which the main one is:
>
> writeln = 4;
>
> That is quite indefensible :o|. I consider the others rather minor, but
> that's just a personal opinion.
>
> How about this. Maybe if we attacked this annoyance in particular, that
> would be a large bang for the buck without a landslide change in the
> compiler. We only need some way to inform the compiler, "yes, it's ok to
> call a.b(c) as a.b = c". Ideas?
That seems like a bad idea if it allows a forgetful/lazy/overworked library
writer to cause users to be unable to use property syntax in natural cases.
I'd say explicit forbidding of property syntax is a better idea.
Based on some people's view of properties, allowing property get syntax for
pure functions would make a lot of sense. Others would hate that. I'm not
sure if restricting users would be all that popular. It may be better
placed in some kind of lint tool.
More information about the Digitalmars-d-announce
mailing list