Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!usenet.eel.ufl.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!xlink.net!news.ppp.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: The new paper and static binding in dylan.
Message-ID: <1995Mar2.092308.4193@wavehh.hanse.de>
Organization: The Internet
References: <3j0vfm$506@cantaloupe.srv.cs.cmu.edu> <9503010642.AA05334@uma.ori.hitachi-sk.co.jp>
Date: Thu, 2 Mar 95 09:23:08 GMT
Lines: 51

mutsumi@ori.hitachi-sk.co.jp (Mutsumi Komuro) writes:

>On 01 Mar 95 05:08:06 +0000
>owner-info-dylan@cambridge.apple.com wrote: 
>> In article <1995Feb27.162850.10467@wavehh.hanse.de>,
>> Martin Cracauer <cracauer@wavehh.hanse.de> wrote:
>> >it doesn't say whether Dylan will offer static
>> >binding. To reach C++'s speed, Dylan has to be able to do static binding and
>> >inlining and carry that out so far that the necessary information is
>> >taken into containers to operate on elements.
>> >I don't know very much about compiler technology for modern dynamic
>> >languages, but as far as I can imagine, Dylan will not offer inlined
>> >calls that far. 
>> 
>> In many important situations it is possible to "statically bind" a method by
>> proving at compile time that a particular method must be the applicable one
>> (based on static argument type information.)  Any even vaguely efficient Dylan
>> implementation must at least support this for language primitives like +, etc.
>> Quality implementations should also do compile-time selection of user methods.

>Yes, I agree. 
>I believe that the sealing declarations are invented for this purpose.

Ah. I failed to recognise this. One thing is unclear to me:

From the DIM, page 93:

'A method M which is congruent to G and which is not an explicitly
known method in L may be added to G if and only if at least one of the
specializers for M is disjoint from the corresponding type in the
sealing form.'

What exactly does 'disjoint from he corresponding type' mean? Is a
subclass disjoint or not? 

To prevent myself from being unclear again:

I cannot add a method with one parameter 'a' of type 'A1' to a sealed
generic function that already has a method for parameter 'a' that is
type 'A0' when 'A1' is a subclass of 'A0'?

As I understand, static binding for sealed generic functions on a
sealed class can only happen when this method addition is not allowed.
Sealed classes are still allowed to have subclasses and the exact type
is not know at compile-time. So Dylan forbits this.

Right?

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Private email Martin.Cracauer@wavehh.hanse.de Fax +4940 522 8536. No NeXTMail!
