home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.clos:1003 comp.lang.lisp:2893 comp.lang.eiffel:1310
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!sicsun!disuns2!/!matomira
- From: matomira@disuns2.epfl.ch (Fernando Mato Mira)
- Newsgroups: comp.lang.clos,comp.lang.lisp,comp.lang.eiffel
- Subject: Type declarations and generic classes in CLOS - HOW??
- Summary: Here we go again...
- Message-ID: <1992Nov16.182518@disuns2.epfl.ch>
- Date: 16 Nov 92 17:25:18 GMT
- Sender: news@disuns2.epfl.ch
- Reply-To: matomira@disuns2.epfl.ch (Fernando Mato Mira)
- Followup-To: comp.lang.clos
- Organization: Ecole Polytechnique Federale de Lausanne
- Lines: 30
- Nntp-Posting-Host: disun47.epfl.ch
-
- Let's say you have a class:
- (defclass foo () ((x :accessor x :type number)))
-
-
- and you would like to be able to do something like:
- (proclaim (type (foo integer) an-instance))
-
-
- so a smart LISP compiler can avoid type checking when you write:
- (proclaim (type integer n))
- (setf n (x an-instance))
-
- How would you go about? It seems that generic classes (and the general issue of
- type declarations - see article "Declaring types by association in CLOS")
- have been overlooked in the design of CLOS.
-
- I am trying to do VR, so every declaration counts.
-
- I remember a paper by Luca Cardelli on an implementation of ML with a
- higher-order type system. Shouldn't LISP have something like that to
- stay at the cutting edge?
-
- --
- Fernando D. Mato Mira
- Computer Graphics Lab "I must admit it, I have learned
- Swiss Federal Institute of Technology some things from Eiffel"
- matomira@di.epfl.ch
-
- NeXTMail : matomira@lignext.epfl.ch
- FAX : +41 (21) 693 - 5328
-