From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,7f8fc37d854731d6 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,7f8fc37d854731d6 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,7f8fc37d854731d6 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,7f8fc37d854731d6 X-Google-Attributes: gid114809,public X-Google-Thread: 10461e,7f8fc37d854731d6 X-Google-Attributes: gid10461e,public From: pcg@aber.ac.uk (Piercarlo Grandi) Subject: Re: Interesting but sensitive topic to discuss (HELP: - OOP and CASE t Date: 1996/11/20 Message-ID: #1/1 X-Deja-AN: 197707056 sender: pcg@osfb.aber.ac.uk references: <32813322.41C6@kyebek3.kjist.ac.kr> <6KRKVf9k3RB@herold.franken.de> <3282F9EE.7E7@concentric.net> <6KVOxOkk3RB@herold.franken.de> <847822216.17951.0@abwillms.demon.co.uk> <6KkYng6-3RB@herold.franken.de> organization: Prifysgol Cymru, Aberystwyth newsgroups: comp.object,comp.ai,comp.lang.ada,comp.lang.c++,comp.lang.smalltalk Date: 1996-11-20T00:00:00+00:00 List-Id: >>> "jhd" == Joachim Durchholz writes: >>>> Could anybody post a short characterisation of prototype languages? >> Basically, instead of creating a class, we instead create a blank >> object and insert methods into it. Any object of that 'type' is a kind >> of clone of that prototype object. jhd> Hum, I think this description applies to class-based languages as jhd> well. Just say 'class' instead of 'blank prototype object'. Not quite -- for one can then change one of those clones and make it into a prototype for a new kind of objects, something which is quite not possible in class based systems. Also note that the prototype need not be ``blank'' at all. Also, if procedures belong _to_ objects instead of encapsulated _in_ classes, it becomes fairly natural to do reuse not quite by defining a class by mixing in it procedures from other classes, but by forwarding operations from one object to another, which need not be its prototype; thus it is fairly natural to use delegation rather than inheritance in prototype systems (even if the 'clone of' relationship can be used as if it were an inheritance like relationship). An example is that if a trait of a prototype is declared irrevocably immutable, there is no need to duplicate it in every clone of that prototype object; it and all its clones can ``share'' that trait. The net effect is that then the implementation starts to resemble very much that of a class based system. jhd> When are the methods inserted - at run-time? Could well be, but not necessarily. jhd> Then there's a real difference, [ ... ] Not quite, for there are systems where classes can also be changed at runtime