[Laszlo-dev] For Review: Change 20071107-dda-g Summary: Allow type information for vars, even though ignored in SWF7/8 and DHTML.
dda at ddanderson.com
Wed Nov 7 15:51:29 PST 2007
Change 20071107-dda-g by dda at freddie.local on 2007-11-07 18:14:27 EST
Summary: Allow type information for vars, even though ignored in
SWF7/8 and DHTML.
Allow type information accepted in ActionScript 3.0, that is:
var y:String = "hello";
var z:?String = null; // ? means can set to null (default)
var z:String! = "bonjour"; // ! means cannot set to null
Please note that the type information is merely accepted as part
of the language, and ignored for now.
Bugs Fixed: LPP-5059
Technical Reviewer: ptw
QA Reviewer: philip
Doc Reviewer: (pending)
Requires documentation if we describe in detail our language (or
subset). If we point
users to the published standards, then we can continue to do that.
We should note that type information is ignored except for the
(upcoming) SWF9 runtime.
Variables declared using the 'var' statement now allow type
described by Ecmascript 4 (that is, ActionScript 3.0).
No type checking is done by the SWF7/8 and DHTML runtimes (nor
is planned), any
type information is thrown away. However, when SWF9 is
available, the type information
will be accepted and passed through to the 3rd party SWF9
compiler, which will do type
checking for any variable with type information. This change
allows users and developers
to write code that can be useful with either runtime. Even if
they don't use with SWF9,
this is a useful feature for self documenting usage of variables.
We currently allow type information on 'var' declarations, also
method parameters and
method return values. I believe only information for 'var'
declarations can be done
in .lzx, but the latter two are also accepted (and ignored for
current runtimes) in .lzs files.
Ran new test test/typevar.lzx for both SWF7/8 and DHTML, to make
sure syntax is accepted.
Ran smokecheck.lzx to assure there are no regressions.
Java/C/C++, Berkeley DB, systems consultant
Email: dda at ddanderson.com
More information about the Laszlo-dev