Agree 100%. Just a matter of resources. Right now, you get that "for free" when you compile to swf9/10, because the flex compiler does exactly that. :)
Personally, I find that when I am developing/debugging, it works very nicely to prototype in swf8, where all errors are just ignored, and then to alternately compile to dhtml and swf10 to make my code more product quality. I used DHTML because the Firefox and Webkit Javascript debuggers are very powerful and easy to use, and I use swf10 because does a great job of catching static type errors. On 2009-11-19, at 16:16, Rami Ojares / AMG Oy wrote: > And one more idea. > > Would it not be better to have static typing in the future in laszlo > enforced. Because it seems much easier to take the types away during > compilation than to add them. And the compiler could help the developer more > showing some of the type related errors. > > - rami > > P T Withington wrote: >> On 2009-11-19, at 10:17, Rami Ojares / AMG Oy wrote: >>>> We have added some syntax from 'es4'/'as3' (neither of which is an >>>> accepted standard) to support declaring classes, function signatures, > >>>> and default arguments. >>> Is there any documentation about this? >> Unfortunately not. We currently have no resources for documentation. >>> Basically I have understood that I should continue using javascript 1.5 >>> reference and reading Ecmascript edition 3 specification. >> That is the safe thing to do. In general, you don't need to know about the >> extensions if you are writing LZX. >>> Information about edition 4 is difficult to find since even ecmascript.org >>> does not keep it public. >> You can look at the Flex documentation, because edition 4 was closely >> patterned on that. >> As a basic summary, in OpenLaszlo script, the extensions to edition 3 are: >> o You can define classes using the `class` keyword. >> Classes compile directly to classes for swf9/10 emulated (using the LFC >> Class substrate) on other runtimes. >> o You can specify types on var's, parameters, and function return type. >> Types are preserved or swf9/10, discarded for runtimes that do not >> understand them. Someday we may add runtime type-checking in debug mode for >> runtimes that do not have that. >> o You can use the default value argument and rest argument syntax. >> Default values and rest arguments are preserved in swf9/10 and emulated in >> other runtimes. >> Your best reference for examples of OpenLaszlo script extensions the source >> of the LFC: http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/
