Re: opPropDispatch

2012-04-22 Thread Jonathan M Davis
On Monday, April 23, 2012 02:40:42 Adam D. Ruppe wrote: > On Sunday, 22 April 2012 at 23:54:17 UTC, Jonathan M Davis wrote: > > Well, strict enforcement is how @property was designed in the > > first place (and is how it's described in TDPL). > > That doesn't affect my argument at all, > > People

Re: opPropDispatch

2012-04-22 Thread Adam D. Ruppe
On Sunday, 22 April 2012 at 23:54:17 UTC, Jonathan M Davis wrote: Well, strict enforcement is how @property was designed in the first place (and is how it's described in TDPL). That doesn't affect my argument at all, People actually use the implementation as it is, which is a superset of the T

Re: opPropDispatch

2012-04-22 Thread Jonathan M Davis
On Monday, April 23, 2012 01:39:44 Adam D. Ruppe wrote: > On Sunday, 22 April 2012 at 23:21:57 UTC, Jonathan M Davis wrote: > > Well, I completely disagree with you on @property. > > Note: my problem is with -property, not @property. > > If @property was correctly implemented, it'd serve > a very

Re: opPropDispatch

2012-04-22 Thread Adam D. Ruppe
On Sunday, 22 April 2012 at 23:21:57 UTC, Jonathan M Davis wrote: Well, I completely disagree with you on @property. Note: my problem is with -property, not @property. If @property was correctly implemented, it'd serve a very nice purpose. The reason I'm aware of the bug is this is something I

Re: opPropDispatch

2012-04-22 Thread Jonathan M Davis
On Monday, April 23, 2012 01:01:48 Adam D. Ruppe wrote: > On Sunday, 22 April 2012 at 22:36:12 UTC, Jonathan M Davis wrote: > > Eventually -property will be the normal behavior. > > Note that -property adds zero value, much like the current > implementation of @property, which fails to disambiguat

Re: opPropDispatch

2012-04-22 Thread Adam D. Ruppe
On Sunday, 22 April 2012 at 22:36:12 UTC, Jonathan M Davis wrote: Eventually -property will be the normal behavior. Note that -property adds zero value, much like the current implementation of @property, which fails to disambiguate cases: == import std.stdio; alias void delegate() callable;

Re: opPropDispatch

2012-04-22 Thread Jonathan M Davis
On Sunday, April 22, 2012 22:30:01 David wrote: > For now you can do it *without* @property and compile *without* -property But that will not remain the case, so relying on that is not a good idea. Eventually -property will be the normal behavior. As for opPropDispatch, I don't think t

Re: opPropDispatch

2012-04-22 Thread David
uot;dispatcher" that supports both the normal method syntax and the property syntax simultaneously. Is this going to change in the future? And if so, how will this be done? Like this? struct Dispatcher { @property void opPropDispatch(string name)(string val) { writeln(val); } @property string o

opPropDispatch

2012-04-22 Thread sclytrack
this? struct Dispatcher { @property void opPropDispatch(string name)(string val) { writeln(val); } @property string opPropDispatch(string name)() { return "getter"; }