At 4/20/08 01:23 AM, Kajenx wrote:
Oh, thanks for pointing that out. Strict mode is probably what's been killing me...
The main thing that's been holding me back with AS3 is the strange elietism that's grown up around it.
That is because people usually don't apreciate learning things that already works the way they do. AS3 is usually a more strict code (unless you disable the strict check). For people who only do animations, it may see as some unnecessary burocracy. But the changes in AS3 have pretty good reasons to be like it. For example:
- AS2 is too condescending with code errors, it may simplify things, but it also mean a really hard time tracking them.
- AS3 comply with the ECMAScript standard, same as Javascript and JScript, meaning it is accessible to any programmer from these languages. The standard also guarantee all OO programming is consistent and respect all OO paradigm, and make the language rules predictable by any 3rd-party tools and future Flash releases.
- codes spreaded randomly through timeline are too hard to read, track and organize. Making classes in separated as files is way better to keep track of some heavy code.
At 4/20/08 01:23 AM, Kajenx wrote:
I'm realizing now that I can do pretty much everything the same way I have been, whith virtually the same code, but I've been avoiding it because all of the "real programmers" have come in and said OOP is the only way to go. It's like everyone suddenly forgot Flash was an animation tool.
The problem is that Flash is not just an animation tool. It is also a very powerful creator for interactive applications. But AS2 was just way too underpowered for code organization, speed optimization and debugging.
Adobe, however, did a wonderful job at allowing AS3 be used easily and unrestricted in animations in the timeline lust like AS2, by just unchecking the strict mode. The problem is that people learning it don't know the hidden check in the AS properties.
At 4/20/08 01:23 AM, Kajenx wrote:
Is there a case when I'll have to worry about root related errors if I'm not importing anything?
Yes. If you try to access some unexistant variable the compilation will only complain at runtime (and only when the variable contents is accessed. The error don't say which line it happened and is hard to track). The compilation will completely ignore it.
In AS2 it ignore even at runtime, allowing errors to be run. And with strict mode it detect these errors promptly at compile time.