[GEEK++] The ActionScript Jabberwocky
Aug. 17th, 2004 11:19 amI'll say upfront that this will make precious little sense to non-programmers, or people unfamiliar with Lewis Carroll. However, for those of us who think in code and have the poem more or less memorized, it is brilliantly executed and rather amusing.
(If you don't know ActionScript, think "slightly broken JavaScript with the serial numbers filed off".)
(If you don't know ActionScript, think "slightly broken JavaScript with the serial numbers filed off".)
(no subject)
Date: 2004-08-17 08:22 am (UTC)(no subject)
Date: 2004-08-17 10:04 am (UTC)No, really. When I say that ActionScript is "slightly broken", that refers to one unique and interesting quality of the language: virtually *everything* evaluates successfully. There are a few specific syntax errors that will make the compiler choke, but they're surprisingly uncommon. In general, if it looks syntactically correct, it will compile. Worse yet, it will run.
"Worse?". Yes. The way ActionScript achieves this particular miracle is that it *ignores all errors*. It is nearly impossible to get a runtime error from ActionScript. Undefined variable? Assume that the value is "undefined". Bizarre casting error? Do your best and Just Keep Going. Of course, the end results will be totally messed up, but at least it didn't stop!
Needless to say, it's the harshest debugging environment I've dealt with since the days when
Anyway, working in ActionScript has taught me to appreciate the value of errors. I never want to work in an environment without exceptions again...
(no subject)
Date: 2004-08-17 08:33 pm (UTC)(no subject)
Date: 2004-08-18 08:18 am (UTC)I also liked the comment: son.sword has type set to “vorpal” before use ("he took his vorpal sword in hand") but not son.blade ("The vorpal blade went snicker-snack!"). Isn’t that going to cause problems? Can you alias son.blade to son.sword somewhere? Am I taking this too seriously?
[and in reply to another comment: *no errors*? Gah! I know how vicious VB debugging can get after On Error Resume Next is tossed into play, but at least there there's an Error object one can examine to explicitly check, and realtime debugging tools...]