Uniform call syntax for implicit this.
Michel Fortin
michel.fortin at michelf.com
Thu Feb 3 14:48:04 PST 2011
On 2011-02-03 15:50:17 -0500, spir <denis.spir at gmail.com> said:
> How can you propose this, Michel? Complexify the language, and any
> implementation, just for a non-feature that makes code very hard to
> decode, by requiring a double mental rewriting operation:
> foo(i) --> this.foo(i) --> foo(this,i)
> what advantage does this feature provide? None. What additional
> drawback: see thread above.
I'm not really advocating for it. I'm just trying to figure out how it
could be done, what impact it'd have, and what limitations should be
put on it. This uniform call syntax has been talked a lot but never
explored much. I think it's time we look at it so we understand the
problems and the solutions and finally decide if its worth it or not.
What advantages should it provide? Mainly it makes member functions and
standalone functions identical in usage, so whether something is a
member or not becomes a implementation detail the user does not have to
care about. Obviously, if we find out that it can't be done without
complicating things, the feature should be abandoned.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list