Type Specifier

Though EusLisp does not have the deftype special form, type names are used in declarations and functions requesting to specify the type of results or contents, as in coerce, map, concatenate, make-array, etc. Usually, class names can be used as type specifiers, as in (concatenate cons "ab" "cd") = (97 98 99 100), where Common Lisp uses (quote list) instead of cons.

As EusLisp does not have classes to represent numbers, types for numbers need to be given by keywords. :integer, integer, :int, fixnum, or :fixnum is used to represent the integer type, :float or float, the floating point number type. As the element-type argument of make-array, :character, character, :byte, and byte are recognized to make strings. Low level functions such as defcstruct, sys:peek, and sys:poke, also recognize :character, character, :byte, or byte for the byte access, and :short or short for short word access. In any cases, keywords are preferable to lisp package symbols with the same pname.

k-okada 2013-05-21