Ian Thomas wrote:
In reply to Steven:
- Firstly, Wikipedia isn't a great source to quote. :-D
- Secondly, OOP as a style has basic stuff, and it has advanced stuff. I'm
not saying teach inheritance and polymorphism on day 1, I'm saying teach
that objects have properties (and then objects have methods). Not
necessarily because it's _better_ than procedural (we could argue that
forever) but because _almost all day-to-day programming languages that the
students will encounter will involve objects, properties and methods_.

In reply to Alan:

Your first example applies equally to OOP or procedural - it's a code
snippet, not a coding style.

Your second example is overcomplicated - why teach getters and setters from
the word go when a property (public var age:Number;) is far simpler/more
obvious? Yes, getters and setters are part of the OOP paradigm, but not a
requirement.

Ian
I would probably be more emphatic about getters and setter. If you are going to hire an "expert" ActionScript programmer and they give you code samples with public properties in their classes, ask for a copy of the liability insurance certificate. It means that they either lazy or not competent and their code will likely contain so-called "shortcuts" that will cost you a lot of time and money later.
If you are going to pay for something, it should at least be safe.

Forgetting the "private" on a property is a full mark deduction in class.


Ron

On 8/21/07, Alan MacDougall <[EMAIL PROTECTED]> wrote:
So rather than engage in an argument as to whether OOP or procedural is
"better", we're basically asking: Do the additional distractions of OOP
justify the payoff from learning it up front? If you're teaching fellow
geeks, then yes. If you're teaching people with a more casual interest
in programming, or (shudder) people who are required to take the class,
you may want to keep it script-simple. Compare:

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to