September 10, 2003
One of the nice features of having a class based language is the fact that you can hide your implementation behind private methods, and expose only the methods/members you want to be "public". The fact that AS2 implements this feature is cool since AS1 using prototype didn't really allow this (without some crazy workaround). However, the Flash Actionscript docs include this statement:
"...note that member access control is a compile-time only feature; at run-time, Flash player does not distinguish between private or public members."
This seems to be a very important statement. This means that the checking is done to prevent any calls to those private members WITHIN a swf, however, in theory, you could actually call those private members from another loaded swf. So it doesn't seem to allow truly private access.
Also, I would have guessed that one of the advantages to having a strong typed language would be to have processing speed increases. I don't know how the player works internally, but you would think that if a variable is typed, the code could be processed more quickly because it doesn't have to do type checking at run-time. However, according to Grant, these strong typed variables get compiled down to "typeless" variables in bytecode. Again, it seems that the typing is only for compile-time checking. Maybe that's to support backwards compatibility...?
Posted by philter at September 10, 2003 10:01 PMComments Disabled