by Rusky · 12y ago · 0 comments
Which of the following is clearer?
plus(new vector(5, 3), scale(3, new vector(7, 3)))
new vector(5, 3).plus(new vector(7, 3).scale(3))
<5, 3> + 3 * <7, 3>The last one is least readable IMHO. It's like a regexp. It's the most ambiguous and has the most potential for errors also.
It's hard to typo "function" and have a program still compile/run. It's a lot easier to typo "fn" and still have the program compile/run. Smaller tokens mean more potential errors.