ECMAchine icon indicating copy to clipboard operation
ECMAchine copied to clipboard

String comparison?

Open davep opened this issue 12 years ago • 2 comments

Now that strings have been added, what's the intended way of comparing them? I note that there's no 'string=?' and the like, there's no current support for eq?, eqv? or equal? and it seems that '=' (and the other obvious primitives) isn't being overridden for this:

ecmachine:/ guest$ (= "Foo" "Foo")
#f

davep avatar Apr 06 '12 23:04 davep

Good point. Which predicates would you like to see? I imagine it wouldn't be too hard to implement them.

AlexNisnevich avatar Apr 06 '12 23:04 AlexNisnevich

I suppose that would depend on your intent for the design of ECMAchine, but I'm thinking that it would make sense to at least follow R5RS on this: http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.3.5

davep avatar Apr 06 '12 23:04 davep