[Laszlo-dev] defining classes in any order in LZX
Donald Anderson
dda at ddanderson.com
Wed Feb 11 14:29:32 PST 2009
I think this is worth filing an enhancement request.
- Don
On Feb 11, 2009, at 4:22 PM, Henry Minsky wrote:
> Currently the way the LZX compiler works, this code gives an error
> "undefined superclass foo for class bar"
>
> <class name="bar" extends="foo"/>
> <class name="foo"/>
>
>
>
> because the compiler parses classes internally in the lexical order
> they occur in the source, and foo is not defined
> yet when it tries to compile bar.
>
> However, we could make the compiler do a pass that stores the class
> declarations and parses them on demand
> so that the order you declare them lexically doesn't matter.
>
> I guess we've gotten this far without the compiler doing this for you,
> but I'm wondering if it would
> be a useful thing to do, considering that other object oriented
> languages generally seem to allow
> it.
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-306-2057
email: dda at ddanderson.com
www: http://www.ddanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090211/2cf7d51f/attachment.html
More information about the Laszlo-dev
mailing list