Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> #($a #a 'a' 1 1.0)

A syntax so easy, you can teach your grandma in 15 minutes.



Indeed, 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.


Separate types for literals, characters and strings? That's already more complex than Python, not to mention TCL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: