Created
April 26, 2010 22:34
-
-
Save wolever/380046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ActionScript is stupid. It's no secret. But, to maintain my own sanity, I need to rant about it… So I'll | |
// do that here. | |
// First, interfaces. | |
// I know, I know… It's not vert sporting to point out flaws in AS interfaces… But they consistently | |
// make me mad, so I'm going to do it anyway. | |
// First, type checking of the implementation. | |
// I think it's done by string comparison instead of, you know, the right way. | |
// Take this interface, for example: | |
interface Foo { function getFoo():Foo; } | |
// And then this implementation: | |
class SomeFoo implements Foo { public function getFoo():SomeFoo { ... }; } | |
// The 'getFoo' method returns an instance of 'Foo' (which also happens to be a 'SomeFoo'), | |
// so the interface contract is fulfilled and everything is happy. Right? | |
// Ha! Nope. As far as ActionScript is concerned, 'SomeFoo.getFoo' has an invalid type signature. | |
// Oh, wait, and they have known about this… For 3 years: http://bugs.adobe.com/jira/browse/ASC-2585 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment