From 1881ced59b26819d9e38d7b71af00101a2bcd058 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 21 Feb 2008 22:59:03 +0100 Subject: Add an example of strictness inheritance. darcs-hash:c51ca976337e6419c72726c23c5556a230bf2b4d --- example.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example.lisp b/example.lisp index a8e0690..d35c314 100644 --- a/example.lisp +++ b/example.lisp @@ -64,3 +64,11 @@ (print (subtypep 'b 'printable)) ;=> T (print (subtypep 'b 'additive)) ;=> T (print (subtypep 'b 'serialisable)) ;=> NIL + +;; Protocols by default inherit their direct ancestors' strictness, +;; where NIL is recessive, while T is dominant. In any case, a +;; strictness default can be overridden by providing the :STRICTNESS +;; option explicitely. +(print (subtypep 'a 'field)) ;=> T +(print (subtypep 'a 'serialisable)) ;=> NIL +(print (subtypep 'a 'serialisable-field)) ;=> NIL -- cgit v1.2.3