[Laszlo-dev] [Platform-team] Documentation needed for SWF9 -- JS2/SWF9 changes/additions to LZX

Henry Minsky hminsky at laszlosystems.com
Wed Apr 30 09:39:44 PDT 2008


[Moving discussion to dev list]

Another  issue is that  people are accustomed to writing code
which declares several args on a method, and then calling that method with
less args, assuming the
runtime defaults the missing values to null.

People will have to update their code to  either declare some of those args
optional, or pass the correct number of arguments from all callers.

We do not want to go down the route of trying to make our compiler fill in
missing arguments automagically.

But this is effectively making our dialect of javascript more strict than
what people are accustomed to
in JS1 runtimes.


On Tue, Apr 29, 2008 at 6:02 PM, David Temkin <temkin at laszlosystems.com>
wrote:

> Amy,
>
> This came up during Friday's SWF9 call, but by the time I'd dialed in,
> you'd already left the call. I wanted to make sure these requirements get
> captured. They'll be needed for the 4.1 release, which will have
> "preliminary" SWF9 support built in.
>
> Since supporting typed variables creates developer-visible additions to
> the LZX language, additional documentation is needed:
>
> (1) To validate all changes to LZX as per ordinary process
> (2) To document these changes for developers, especially existing
> OpenLaszlo developers as well as Javascript developers
>
> Here's what I can think of that needs to be covered. Perhaps some of it is
> already documented -- if that's the case, let me know where to look. It
> should all be in one place when we release 4.1.
>
> I'm sure the team will have more questions.
>
> Some of these are, I think, still open questions. They could be addressed
> on (say) a Wiki page that eventually turns into a part of the documentation.
>
> - D.
>
>
> -------------
>
> How does typing work in LZX (JS2) in general? Why is it being added? What
> does it deliver? Do developers need to modify their existing LZX code in
> order to use OL 4.2?
>
> In LZX files,
>  -- how are typed variables declared in a method or script block?
>  -- how are typed arguments declared in a method declaration?
>  -- how is a return type declared in a method?
>  -- can a method with typed arguments be overriden by a method whose
> arguments are untyped? what are the consequences?
>  -- how is a mixin declared in an LZX-declared class?
>  -- how is an interface declared in an LZX-declared class?
>
> In script files (now called ".lzs" files) and <script> blocs,
>  -- what JS2 keywords are supported?
>     -- class, type declarations override, method, other stanard JS2 stuff
>     -- interface? anything else?
>  -- what non-JS2 keywords are supported?
>     -- mixin, other non-standard keywords
>
> Performance and typing
>   -- What are the effects of adding types to your code?
>   -- In SWF9, what benefit can you expect if you do not add types to your
> code?
>   -- What are the performance effects of calling typed functions/methods
> with untyped variables?
>   -- What performance effect do typed variables have in runtimes that do
> not support strict typing?
>
> Types and errors
>   -- What kinds of mismatches are compile-type errors and warnings?
>   -- What are runtime errors (warnings?)?
>   -- What happens to runtime errors in runtimes that do not support strict
> typing?
>
> Any new limits on dynamism
>   -- What new limits are now in place for things like <state> that were
> not previously there?
>   -- What new limits are in place for runtime code (e.g., can't add a
> method at runtime?)
>
>
>


-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080430/83551e40/attachment.html


More information about the Laszlo-dev mailing list