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

Tcl is such fun. except for using expr to do math. i mean in other languages

a + b

in Tcl its

expr $a + $b

thats my only beef.



Then switch to using "LISP like" math in Tcl:

   $ rlwrap tclsh 
   % namespace path {::tcl::mathop}
   % + 2 4
   6
   % - 6 1
   5
   % - [+ 6 3] [+ 1 1]
   7


this is ok for simple things but using trig functions etc gets hairy to my taste.




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

Search: