or: \/ etc

Brian Rice water at tunes.org
Thu Mar 17 16:25:29 PST 2005


Well, that's another issue (BUG); I'll start investigating.

Note that "Nil is: Boolean" returns True somehow. So there's an 
inheritance problem. "Path from: Nil to: Boolean traits" gives me 
("Path" traitsWindow traits). So I need to look deeper to see how to 
disentangle these objects. I'll reply when I have a result.

Thanks!

On Mar 17, 2005, at 3:31 PM, Tim Olson wrote:

> On Mar 17, 2005, at 9:33 AM, Brian Rice wrote:
>> What's happening is that, inside blocks, the bytecode compiler is 
>> optimizing this into low-level control-flow codes that don't (and 
>> right now, can't) check the type of the arguments. (see 
>> generate:on:from: methods for #/\, #\/, #and:, #or: in 
>> src/mobius/vm/interp/compiler.slate).
>
> Interesting.  But that optimization only appears to happen when the 
> second argument is  a block.  However, when I evaluate:
>
> 	Nil \/ Nil
>
> I get "True", rather than a "method not found" error.
>
> The method being applied seems to be:
>
> _@(Boolean traits) \/ _@(Boolean traits) [True].
>
> as determined from this:
>
> [ | m1 m2 m3 |
> m1: (#\/ findOn: {True. True}).
> m2: (#\/ findOn: {Boolean. Boolean}).
> m3: (#\/ findOn: {Nil. Nil}).
> {m1 == m2. m1 == m3. m2 == m3}] do.
> => {True. True. True}
>
> This also appears to happen for small integers, as well as Nil.  So 
> how do Nil and the small integers match the (Boolean traits) trait?
>
> 	-- tim
--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/




More information about the Slate mailing list