home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / clos / 1003 next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.7 KB

  1. Xref: sparky comp.lang.clos:1003 comp.lang.lisp:2893 comp.lang.eiffel:1310
  2. 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
  3. From: matomira@disuns2.epfl.ch (Fernando Mato Mira)
  4. Newsgroups: comp.lang.clos,comp.lang.lisp,comp.lang.eiffel
  5. Subject: Type declarations and generic classes in CLOS - HOW??
  6. Summary: Here we go again...
  7. Message-ID: <1992Nov16.182518@disuns2.epfl.ch>
  8. Date: 16 Nov 92 17:25:18 GMT
  9. Sender: news@disuns2.epfl.ch
  10. Reply-To: matomira@disuns2.epfl.ch (Fernando Mato Mira)
  11. Followup-To: comp.lang.clos
  12. Organization: Ecole Polytechnique Federale de Lausanne
  13. Lines: 30
  14. Nntp-Posting-Host: disun47.epfl.ch
  15.  
  16. Let's say you have a class:
  17. (defclass foo () ((x :accessor x :type number)))
  18.  
  19.  
  20. and you would like to be able to do something like:
  21. (proclaim (type (foo integer) an-instance))
  22.  
  23.  
  24. so a smart LISP compiler can avoid type checking when you write:
  25. (proclaim (type integer n))
  26. (setf n (x an-instance))
  27.  
  28. How would you go about? It seems that generic classes (and the general issue of
  29. type declarations - see article "Declaring types by association in CLOS")
  30. have been overlooked in the design of CLOS.
  31.  
  32. I am trying to do VR, so every declaration counts.
  33.  
  34. I remember a paper by Luca Cardelli on an implementation of ML with a
  35. higher-order type system. Shouldn't LISP have something like that to
  36. stay at the cutting edge?
  37.  
  38. -- 
  39. Fernando D. Mato Mira
  40. Computer Graphics Lab               "I must admit it, I have learned
  41. Swiss Federal Institute of Technology            some things from Eiffel"
  42. matomira@di.epfl.ch
  43.  
  44. NeXTMail : matomira@lignext.epfl.ch
  45. FAX      : +41 (21) 693 - 5328
  46.