5 ms·
I don't think Lisp could even be said to have a genus system - to have a "system" for dealing with sets of objects implies having a way to talk about those sets
by lmm 11y ago
I don't think Lisp could even be said to have a genus system - to have a "system" for dealing with sets of objects implies having a way to talk about those sets, do set operations (intersection/union/product) etc.
But in any case, any genus-but-not-type system is irrelevant to my original point: that when writing an x86-64 assembler in lisp (as an embedded DSL), any enforcement of restrictions at compile time would have to be expressed as ad-hoc macros, because there is no (language-standard) type system in which to declare them.
- kazinator 11y agoCommon Lisp in fact has type expressions with set operations. $ clisp -q [1]> (typep nil '(and symbol list)) T [2]> (typep :foo '(and symbol list)) NIL [3]> (typep '(1 2) '(and symbol list)) NIL [4]> (typep '(1 2) '(or symbol list)) T [5]> (typep 3 '(or symbol list) I.e. I can in fact talk about sets of objects, in a formal way, with the Lisp system.