Closed
Description
Since chaining is a pretty common feature of Javascript libraries, how about a dedicated syntax for it?
e.g.
$("p.neat").addClass("ohmy").show("slow");
could be written
$("p.neat").. # Note the "dot dot"
addClass "ohmy"
show "slow"
Alternatively, you could go with something insanely LISPy
->>
$ "p.neat"
addClass "ohmy"
show "slow"
NB, the semantics I'm proposing would be equivalent to
a = $ "p.neat"
b = a.addClass "ohmy"
c = b.show "slow"
Metadata
Metadata
Assignees
Labels
No labels