Closed causal-agent closed 12 years ago
In Clojure, it really has a purpose. I have never understood why Ruby has ?a
syntax, so I don't think Apricot should have anything like it either.
It's for the code golf!
I do remember something of ?a
syntax actually. In Ruby 1.8 ?a
would return 97
, but in Ruby 1.9 it returns "a"
.
And Lisp code golf sounds pretty scary.
Since Ruby doesn't have a Character class, I'm going to close this.
Both Clojure (
\a
) and Ruby (?a
) have character literal syntax. In Clojure, this is actually useful because it creates ajava.lang.Character
. In Ruby, however, this syntax seems to be useless other than saving one character of source code, since Ruby has no character class and it simply creates a string with one character in it.It seems useless to me, but it would be easy to implement and might make someone happy. Discuss.