flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Newman <Capta...@unFocus.com>
Subject Re: Language features
Date Tue, 12 Feb 2013 18:06:53 GMT
I do that too, but usually only when there is also a getter/setter (it's 
probably bad practice, but that's what I do). I also though it could 
work to use the "$" for private and protected vars, and leave public 
getter/setters unprefixed, but it still wouldn't be obvious that you are 
using a public property or method over a locally defined variable or 
function etc.. The @ symbol (as a replacement for "this.") would make it 
all much more obvious.

Anyway, just an idea :-)

Kevin N.

On 2/12/13 12:39 PM, Avi Kessner wrote:
> Our coding convention is to preface all private vars with _ so you have
> _myVar as a private class scopes var and myVar as a method argument or temp
> var which only exists in the scope of the function.
> On Feb 12, 2013 6:27 PM, "Kevin Newman" <CaptainN@unfocus.com> wrote:
>> This might seem like a minor thing, but I'd love to see a property
>> shortcut similar to coffee script, so instead of this.whateverProp, it'd be
>> @whateverProp. I know we can just omit "this." in AS3, but I think it's
>> actually harder to read that when you come back to a code base after a few
>> years (like I'm doing now). Using "this." or simply "@" to indicate a
>> property would more clearly distinguish between property and scope chain
>> variable, with a minimum of additional typing overhead.
>> Kevin N.

View raw message