Path: news.daimi.aau.dk!news.uni-c.dk!newsfeed.sunet.se!news00.sunet.se!sunic!news99.sunet.se!nntp-trd.UNINETT.no!nac.no!ifi.uio.no!usenet From: alfh@gyda.ifi.uio.no (Alf-Ivar Holm) Newsgroups: comp.lang.beta Subject: Re: Adding methods without renaming the class (was Re: What's wrong with this picture?) Date: 28 Dec 1995 14:21:43 +0100 Organization: Dept. of Informatics, University of Oslo, Norway Lines: 32 Message-ID: References: <4aodps$70h@netnews.upenn.edu> <4b6p2p$dua@fbi-news.Informatik.Uni-Dortmund.DE> <4b9apo$aop@krone.daimi.aau.dk> <4bkilb$g47@netnews.upenn.edu> NNTP-Posting-Host: gyda.ifi.uio.no In-reply-to: Wolfgang Ziller's message of 24 Dec 1995 22:02:19 GMT CC: X-Newsreader: Gnus v5.1 In article <4bkilb$g47@netnews.upenn.edu> Wolfgang Ziller writes: > olevi@daimi.aau.dk (Ole Villumsen) wrote: > >There's another possibility: using an attributes slot. > > > >myClass: (# <> > > > > methodA: (# ... #) > > ... > > #); > > > >Such a slot allows you to define in a different fragment, additional > >methods for myClass, even if myClass is written by someone else, > >frozen and delivered to you. > > However, the FAQ (v. 1.7) says that this is not possible > with the current compiler since certain ambiguities come up > by doing that. To (partially) solve the problem, one is > allowed to write <> which > only allows *one* attribute to be added. > > Has this problem been fixed in the current implementation > or is the limitation still in place? F08 in the FAQ refers to the grammar, not the compiler. The fragment system is part of the implementation and has an alias between and , i.e. the above is possible. (On the other hand, I don't know why the grammar would be ambiguous if were allowed to generate itself.) Affi