Thread View: comp.lang.clos
1 messages
1 total messages
Started by Fernando Mato Mira
Mon, 16 Nov 1992 17:25
Type declarations and generic classes in CLOS - HOW??
Author: Fernando Mato Mira
Date: Mon, 16 Nov 1992 17:25
Date: Mon, 16 Nov 1992 17:25
30 lines
1680 bytes
1680 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads