Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!news.sprintlink.net!howland.reston.ans.net!xlink.net!nntp.gmd.de!nntp.darmstadt.gmd.de!news.th-darmstadt.de!isa.informatik.th-darmstadt.de!kuehne From: kuehne@sun46.isa.informatik.th-darmstadt.de (Thomas Kuehne) Newsgroups: comp.lang.beta Subject: Re: unusual inner Date: 2 Aug 1995 09:34:04 GMT Organization: TU Darmstadt, Praktische Informatik Lines: 79 Distribution: world Message-ID: <3vngqc$12cu@rs18.hrz.th-darmstadt.de> References: <3ulin4$h07@rs18.hrz.th-darmstadt.de> <3uvr75$5e3@belfort.daimi.aau.dk> <3v5451$12j2@rs18.hrz.th-darmstadt.de> <3v7t9n$147f@rs18.hrz.th-darmstadt.de> Reply-To: kuehne@isa.informatik.th-darmstadt.de NNTP-Posting-Host: sun46.isa.informatik.th-darmstadt.de In article , wpp@marie.physik.tu-berlin.de (Kai Petzke) writes: > I have already explained, how overriding can be implemented. IMHO, it should not be necessary that the programmer *implements* overriding. It should be entirely provided by the language itself. As an aside, it appears to be very inefficient to always check a variable before executing the pattern. > >However, this [solution with component patterns] looks awful to me. > Why is it awfull? Since overriding and code reuse has been programmed by the programmer, apparently because the language does not provide it in the first place. You have to know the scheme of your 'methx' and 'virt' patterns in your example in order to change something. You can regard it as an idiom, but IMHO overriding is too low level to be implemented as an idiom everytime. Why suggest 'outer' and such things, if BETA is already complete anyway??? > Any language is a trade-off. BETA has a the very general pattern > concept, but the trade-off is, that a distinction between patterns > and virtual patterns have to be introduced. Normal patterns can > be further extended by subclassing, while virtual patterns are > extended by further virtual bindings. Sorry, I do not understand. Why do you consider the introduction of non-virtual and virtual patterns a trade-off? Do you mean that this introduction was needed for purposes like covariant typing (refinement of generic patterns) and thus is also (although unwanted) present concerning code-patterns? > >Declaring every method 'virtual' by default in C++ seems more > >reasonable than applying the 'overideable' scheme to a method > >by default. > > Can we please keep the discussion to technical aspects? I do. It just do not want to bloke that *implementing* overriding in BETA is even worse than writing virtual in C++ all the time. I think many people would agree with this assignment. However, I assume there were good reasons for the BETA designers to make BETA that way and I would like to know about the reasons that justify such an apparent disadvantage. For that reason, I prefer to say "I feel uneasy" when I think "something is wrong". Maybe the BETA attidude is that overriding leads to bad systems; that redesign from scratch is better than patching old code; that it *should* be some effort for the programmer to leave the safe path of 'inner' refinement. It is too bad, that none of the intimate language connoisseurs, who know about the design goals and decisions, comments on this thread. The above points are the issues I am interested in, not how BETA can *emulate* this and that. The introduction of a variable in order to override a pattern appears like *implementing* late binding with a typecase statement. Of course you can do it like this, but I prefer a language that does it implicitely. -- Thomas +---------------------------------------------------------------------------+ | Thomas Kuehne | | Institut fuer Systemarchitektur | | Fachgebiet praktische Informatik Tel.: 06151/165420 | | Technische Universitaet Darmstadt Fax.: 06151/165472 | | Magdalenenstr. 11c kuehne@isa.informatik.th-darmstadt.de | | D-64289 Darmstadt http://www.isa.informatik.th-darmstadt.de/~kuehne | | | +---------------------------------------------------------------------------+