Xref: utzoo comp.object:3366 comp.lang.misc:7621 comp.lang.eiffel:1542 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!ericom!eua.ericsson.se!euaabt From: euaabt@eua.ericsson.se (Anders.Bjornerstedt) Newsgroups: comp.object,comp.lang.misc,comp.lang.eiffel Subject: Re: A Hard Problem for Static Type Systems Message-ID: <1991Apr26.124626.6941@eua.ericsson.se> Date: 26 Apr 91 12:46:26 GMT References: <1991Apr20.010347.28984@leland.Stanford.EDU> <1991Apr23.152110.6500@eua.ericsson.se> <1991Apr23.195746.6192@leland.Stanford.EDU> Sender: news@eua.ericsson.se Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden Lines: 36 craig@elaine35.Stanford.EDU (Craig Chambers) writes: >In article <1991Apr23.152110.6500@eua.ericsson.se> euaabt@eua.ericsson.se (Anders.Bjornerstedt) writes: >>I suspect that you could express this, or something very close to it, in >>the language CLU. The problem is I dont have the relevant references >>accessible, I am short of time, I am lazy, etc etc. So why do I write >>this ? Well to encourage any person out there knowlegable in CLU to try! >I used to work with the CLU people and have written a number of CLU >programs while a student at MIT. CLU's where clauses provide some of >the solution (they act like the type patterns I alluded to in an >earlier message), but CLU has no subtyping, so it can't handle >comparing subtypes of number. >-- Craig Chambers Yes, but CLU does have parameterized types. If I remeber correctly you could specify the type parameters of a new type by requiring that the parameter types "conform" by having one or more methods with a certain signature. This might be more flexible than using inheritance (of specification), although less safe since signatures say very little about semantics. On the other hand maybe the type parameters have to be bound at compile time in CLU? in which case i guess CLU could not solve the problem. -------------------------------------------- Anders Bjornerstedt Software Development Environments ELLEMTEL Box 1505 S-125 25 Alvsjo SWEDEN Tel: +46-8-727 40 67 Fax: +46-8-647 82 76 E-mail: Anders.Bjornerstedt@eua.ericsson.se