operator + on Number [1 Attachment]

Darius Damalakas <[email protected]> Sun, 15 Jan 2012 14:10:53 +0000
Newsgroups gmane.comp.lang.io
Message-ID <CA+PmVnS+9S0SGsMHD8ffbtGcWMJcLP+SpWYVKzhQ7COg6SrKDA@mail.gmail.com>
Hi everyone,

I am reading Bruce Tate book on 7 languages in 7 weeks, and I came
upon IO. So far this is quite a fun language. But there is one thing
that puzzled me. If i add a slot + for a specific number (say 1), and
then try to view + slot on an object Number, the interpreter exits
with this message:

Io> 1 + := 5
==> 5
Io> Number +

Exception: index out of bounds
Coroutine Exception loop detected

Is this an expected behaviour?  I do not get the reason why a loop
would occur here. It looks like different numbers are different
objects, so, for example a slot + on number 1 would be defined, whilst
number 2 would not have it defined (and search  its prototype for a
slot for a plus sign).

Best Regards
Darius


-- 
Darius