[Laszlo-dev] For Review: Change 20071217-ptw-6 Summary: Class support for swf9
Donald Anderson
dda at ddanderson.com
Tue Dec 18 14:03:49 PST 2007
I've put the compiler manipulations on hold,
since it's looks like we're going native in our class design?
Sorry I've been slow to reply today, been configuring a new system
and moving mail, etc. over.
On Dec 18, 2007, at 3:25 PM, Henry Minsky wrote:
> I think "going native" sounds like a good option. If somebody tries to
> make a subclass with a constructor that
> takes different arg signature, we won't be any worse off than we are
> now if someone tries to make a subclass with an initialize method that
> takes different args.
>
>
>
> On Dec 18, 2007 3:01 PM, P T Withington <ptw at pobox.com> wrote:
>> On 2007-12-18, at 13:59 EST, P T Withington wrote:
>>
>>> And as we discussed on the phone in the constructor:
>>>
>>> public function Subclass (~~~) {
>>> ~~~
>>> this.initialize.apply(this, arguments);
>>> }
>>>
>>> NOTE: there is a bug in AS3 where `arguments` will not be defined if
>>> `...rest` is used. So, perhaps it will be better to say:
>>>
>>> public function Subclass (<formals>) {
>>> ~~~
>>> this.initialize.call(this, <formal id's>);
>>> }
>>
>> Ok, I don't think that is going to fly either, we are still going to
>> get arglist collisions.
>>
>> I'm now starting to think we want to ditch Instance and 'go native'.
>> We don't actually have any classes that have constructors do we?
>> They
>> just use the instance initialize method as if it were a constructor.
>> So, one approach is for the compiler to rename the initialize method
>> to be the constructor. The other is for us to fix up the LFC to
>> actually use constructors.
>>
>> I'm thinking I favor the latter. If we fix the LFC, then we don't
>> need Instance. The compiler has much less work to do. We are more
>> in
>> line with standards. The only thing we have to do is be more
>> explicit
>> about the static initialize method.
>>
>> This will probably break the LFC for swf and dhtml, but we can fix
>> that up later.
>>
>> Thoughts?
>>
>>
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
More information about the Laszlo-dev
mailing list