"with" should be deprecated with extreme prejudice
Nick Sabalausky
a at a.a
Sun May 17 21:41:41 PDT 2009
"Rainer Deyke" <rainerd at eldwood.com> wrote in message
news:guqno8$2fci$1 at digitalmars.com...
> Andrei Alexandrescu wrote:
>> In a member function there's no need to prefix each member.
>
> There isn't, but there should be. IMO.
> 'with' should be banned.
> Implicit access to members of 'this' should also be banned. I always
> use explicit 'this->' in C++ and explicit 'this.' in D. It makes the
> code much easier to read.
>
This is what I love about Ruby's member access. It's just like you suggest,
but with "@" prepended instead of "this." which IMO is much too clunky to
require for something as common as accessing a member of the current
instance. But other than that little quibble I love the idea.
More information about the Digitalmars-d
mailing list