It is called encapsulation.
No one should know how a class does its magic. The external classes are
programmed to the interface (methods)(preferably to an interface class
rather than directly to the implementation) , they are not allowed to
peek inside.
What if you find a better way to
Hi all,
this should be kind of a simple one. I have been creating my Private
variables as simple camelCased names.
private var variableName:VariableType;
I have seen other people creating them as underscore camelCased names and
recently I was challenged that the underscore was the correct
I only use underscore for private variables if I have a public getter
and/or setter for that private variable. Otherwise, I don't use
underscore. It's also a easy way to see, at a glance, which private
variables are private and which are public but private.
private var _title:String;
Also, when it comes to flags, I use the isSomething naming convention
regardless of private/public status. If it's a private flag with a
public getter, I make the public getter the name of the flag without the is.
private var isActive:Boolean;
public function get active():Boolean
{
return
[EMAIL PROTECTED] wrote:
this should be kind of a simple one. I have been creating my Private
variables as simple camelCased names.
private var variableName:VariableType;
I have seen other people creating them as underscore camelCased names and
recently I was challenged that the
it down.
regards,
Muzak
- Original Message -
From: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, June 02, 2007 12:25 AM
Subject: [Flashcoders] Best Practices question...
Hi all,
this should be kind of a simple one. I have been creating my Private
variables
And since we're talking best practices, you don't
have any public instance variables anyhow, hmm? :)
I don't know what best practice you're referring to that claims that
you shouldn't have public instance variables.
The Wikipedia says NEED CITATION.
Which I will promptly ignore as rubbish.
On 6/1/07, Steven Sacks [EMAIL PROTECTED] wrote:
And since we're talking best practices, you don't
have any public instance variables anyhow, hmm? :)
I don't know what best practice you're referring to that claims that
you shouldn't have public instance variables.
Grin. Well, he said OO
8 matches
Mail list logo