Hi! >> The problem with this is that it reduces expressiveness in the >> language and increases the amount of unnecessary decoration, >> reducing readability. > > I disagree with this premise. The $this here is not just decorative > syntax, it's an actual variable, which can be passed around just like > any other variable. The -> is then the standard way of accessing a > property or method, applied to that variable.
Completely agree. The problem with going to far with overly "expressive" code - i.e. one that uses as little characters as possible - is that it becomes less and less comprehensible. $this-> is not too long to be any real problem (and if it's really that troublesome one always can code a macro in their editor). It is abundantly clear to both novice and seasoned programmer. It is a subclass of wider standard syntax (-> as member access). It has shared pattern for properties and methods, so you don't need to keep too many concepts in your mind to parse it. I don't think saving half-dozen characters is worth sacrificing all that. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php