Previous: Method Generators, Up: Generic Dispatch
A dispatch tag is an object that represents the “type” of an object, for the purposes of generic dispatch. Every object has an associated dispatch tag. Built-in objects like pairs or booleans have predefined tags, while dynamically typed objects like records have tags that are created as needed.
Returns the dispatch tag for object.
(dispatch-tag #f) => #[dispatch-tag 17 (boolean)] (dispatch-tag #t) => #[dispatch-tag 17 (boolean)] (dispatch-tag (list)) => #[dispatch-tag 18 (null)] (dispatch-tag (list 3)) => #[dispatch-tag 19 (pair list)]
Returns the built-in dispatch tag called name. Name must be a symbol that is the name of a known built-in dispatch tag.
(built-in-dispatch-tag 'boolean) => #[dispatch-tag 17 (boolean)] (built-in-dispatch-tag 'null) => #[dispatch-tag 18 (null)] (built-in-dispatch-tag 'pair) => #[dispatch-tag 19 (pair list)] (built-in-dispatch-tag 'list) => #[dispatch-tag 19 (pair list)]
Returns the dispatch tag associate with record-type. See See Records, for more information about record types.