On Thu, 1 Jul 2004 09:46:10 +1000, Andrew Scott <[EMAIL PROTECTED]> wrote:
> Scott, my examples are not runtime they are design/development time and that
> my dear fellow is a lot different than you are throwing back at me.

As Robin H said, that's a very peculiar distinction to make... In
fact, I don't even know what you think you mean... could you explain
what you see as the difference and why these examples are one rather
than the other?

> If someone asks the question like Taco did, should I turn around and so not
> to use the this scope?

I would hope you'd say "As a rule, "this" scope should not be used.
But, as with all rules, there are exceptions. However, you need to
learn a fair bit about OO before you'll be ready to understand those
situations when "this" scope may be acceptable." - if that is not your
answer, you'll be misleading the newbie who asked you.

> The 2 examples I gave don't rely on the breaking of the rule of
> encapsulation, that would be like this bit of code in Java, there is no
> checking to see if I set any of the variables to a -1.

And, frankly, this is a very poor piece of Java. But it looks like an
overly simple example that is intended to teach something rather than
real code. Of course, it sucks as a teaching example too. I'm curious
as to where you found it - I'm certain my team didn't write it (you
indicate it's Macromedia-authored in a subsequent post).

Let me say that I think Macromedia - and Allaire before them - has
published a lot of bad example code. I've had plenty to say internally
about the code quality in articles and sample apps. It's really a hot
button for me (since I spent the best part of a decade auditing code
and reviewing best practices worldwide for several computer
languages). I'll also say that the issue is being addressed to some
extent for Blackstone - Tim and Ben have already mentioned that
Blackstone will probably include improved behaviors for Dreamweaver
that generate much better code. The product and documentation teams
are very conscious of the coding standards issue this time around.

> And just because I choose NOT to use setters and getters all the time, in
> rare cases I don't think it is necessary doesn't mean that I am a bad
> programmer.

Scott does. And your vehement adherence to your position is beginning
to incline me the same way, I'm afraid. You're not even acknowledging
that it is best practice to *not* use "this" scope - you're basically
arguing that "this" scope is best practice (in some unspecified
situations). That suggests that you don't understand the dangers,
despite arguing to the contrary, or that you don't understand how to
communicate to newbies why they shouldn't use "this" scope.

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to