4 ms·
I guess I wasn't really thinking about why choose those names. If it was just that you could have whatever you like - I like (hd x) and (tl x) but that's me.
by bayareaguy 19y ago
I guess I wasn't really thinking about why choose those names. If it was just that you could have whatever you like - I like (hd x) and (tl x) but that's me. Or even (0 x) and (1: x) could work. A rose is a rose and all that.
What I was really thinking about were things like why have pairs as a primitive and why enshrine the idea of lists as pairs linked up in a certain way?
From ac.scm, it looks like the current set of primitives are:
(define (ar-type x)
(cond
((ar-tagged? x) (vector-ref x 1))
((pair? x) 'cons)
((symbol? x) 'sym)
((null? x) 'sym)
((procedure? x) 'fn)
((char? x) 'char)
((string? x) 'string)
((integer? x) 'int)
((number? x) 'num) ; unsure about this
((hash-table? x) 'table)
((output-port? x) 'output)
((input-port? x) 'input)
((tcp-listener? x) 'socket)
((exn? x) 'exception)
(#t (err "Type: unknown type" x))))
So why that set? Why have chars and strings and symbols? Why have integers and numbers?