[r6rs-discuss] [Formal] Add symbol=? and boolean=?

From: Per Bothner <per>
Date: Sat Feb 10 12:32:04 2007

Carl Eastlund wrote:
> I'm not sure I understand this claim. I do not view eq? as a hack.
> It's not (solely) intended to be "equal? lite", a faster version of
> equal? restricted to "small" values.

One could argue that eq? tests for "object identity". However,
(one could also argue) that booleans, symbols, and numbers are
immutable values, not objects, and so object identity is a
meaningless concept. The reason we have eq? defined on symbols
and boolean (not it is not defined on numbers) is because Scheme
has rather mushy semantics when it comes to values versus objects.

Of course there is a history here so changing the semantics of eq?
is out of order, but it seems that if you were to design a language
from scratch you probably make a clearer distinction between values
and objects.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Sat Feb 10 2007 - 12:30:36 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC