Indeed. I plan to change `is` in Arubic. Though it also seems like a good idea to replace `is` with `iso` and use `id` or something for identity checks, as already mentioned in this thread.
In fact, in Arubic I plan for strings to just be a special subtype of conses, so you can use car and cdr on strings, and all operators that expect conses should work on strings as well.
"In fact, in Arubic I plan for strings to just be a special subtype of conses, so you can use car and cdr on strings, and all operators that expect conses should work on strings as well."
Can you set the car of a string to an arbitrary value, like you can with a cons? Is "" nil?
I'm not trying to change your mind, but "all strings are conses" is the kind of thing lots of people think would be nifty only to change their own minds later. :)
"Can you set the car of a string to an arbitrary value, like you can with a cons? Is "" nil?"
Yes and yes. I plan for the only difference between strings and conses is that A) they have a type of 'string, in addition to a type of 'cons, and B) they display differently, surrounded by "" rather than ()
Generally speaking, strings will only contain characters (since that's what the string constructor does), but I don't see why they can't contain arbitrary stuff, if you want to do that.
P.S. I might not actually give them a type of string... in that case the only difference would be that they display differently. That might be an interesting approach.
Actually, you probably didn't notice, but in Arubic/Python, strings literally are a subclass of cons, so they really do behave just like conses in almost every situation. I didn't make (is nil "") return t though. That shouldn't be hard to add, but I've been busy on Arubic/ar.