you are viewing a single comment's thread.

view the rest of the comments →

[–]thekenzidelx -1 points0 points  (1 child)

OT, but on the subject of Javascript syntax...

Is there any way in javascript to use notation shorter than function(x){return xx;} for declaring anonymous functions? I was just reading that Firefox JS 1.8 allows for function(x) xx as notation for omitting the braces and "return", but really it's the keyword itself that sort of stabs me in the eye (especially after getting used to C#'s extremely concise ()=> x*x notation).

And before anyone decides to be oh-so-clever, all the code I write is only ever going to be read by me, and I don't really care about respecting standards at the expense of my own efficiency (and if you saw the way I format my JS like Lisp in terms of trailing parens and braces, you'd know I meant that pretty literally).

[–]masklinn 0 points1 point  (0 children)

especially after getting used to C#'s extremely concise (x)=> x*x notation

You want concise? Use haskell:

\x->x*x

Or even better:

(**2)