4 ms·
> #($a #a 'a' 1 1.0) A syntax so easy, you can teach your grandma in 15 minutes.
by Psyladine 7y ago
> #($a #a 'a' 1 1.0)
A syntax so easy, you can teach your grandma in 15 minutes.
- louiscyphre 7y agoIndeed, you can. The first thing to learn here is that the hash (#) signifies a literal symbol. So, #a is a symbol, whereas 'a' is a string (of length 1 and containing the character $a). The second thing to learn is that the dollar sign ($) signifies a character value, so $b is the value of the character "b" and $c is the value of the character "c". #() signifies a literal array created at compile time. Thus, #($a #a 'a' 1 1.0) is an array that contains the character $a, the symbol #a, the string 'a', the integer 1, and the floating value 1.0). Easy peasy.
- theamk 7y agoSeparate types for literals, characters and strings? That's already more complex than Python, not to mention TCL.