On Wed, Apr 22, 2009 at 08:11:04AM +0200, Alexander Burger wrote: > The question is: What is the "correct" way? > > The same problem applies to other symbols as well, when they have > names with special characters. For example: > > : (intern "123") > -> 123 > : (+ @ 7) > 123 -- Number expected > > I will fix 'intern' in 32bit PicoLisp too, so that it recognizes "NIL". > But I'm not sure about other patterns.
The main reason why I fix it is to make it compatible with the 64bit version. In general, 'intern' should do what it is supposed to do, and intern a symbol. When the user chooses to intern a symbol with a strange name like "123" it is his choice. If what the user intends is something different, he are probably better of with some other function. 'any' does more what is expected here: : (any "123") -> 123 : (inc @) -> 124 Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe