To be fair, CoffeeScript most likely had an effect on the design of Dart, Typescript, and the upcoming versions of JS.
IIRC, C#'s lambda expression predate CS's by 2 years and they're almost identical (the biggest difference is that CS has two different "arrows" for capturing the current this or not). And Scala — which again has almost identical lambda syntax) predates C# 3.0 by ~4 more years.
And its syntax looks a lot (though it's not identical to) Haskell's, whose 1.0 definition predates Scala by 13 years.
CoffeeScript (2009): (x, y) -> expr(x, y) or (x, y) => expr(x, y) C# 3.0 (2007): (x, y) => expr(x, y) Scala (2003): (x, y) => expr(x, y) (also shorthand along the lines of expr(_, _), not verified) Haskell (1990): \x y -> expr x y
View all comments
Show parent comment
4
u/masklinn Jul 26 '13 edited Jul 26 '13
IIRC, C#'s lambda expression predate CS's by 2 years and they're almost identical (the biggest difference is that CS has two different "arrows" for capturing the current
thisor not). And Scala — which again has almost identical lambda syntax) predates C# 3.0 by ~4 more years.And its syntax looks a lot (though it's not identical to) Haskell's, whose 1.0 definition predates Scala by 13 years.
CoffeeScript (2009):
(x, y) -> expr(x, y)or(x, y) => expr(x, y)C# 3.0 (2007):
(x, y) => expr(x, y)Scala (2003):
(x, y) => expr(x, y)(also shorthand along the lines ofexpr(_, _), not verified)Haskell (1990):
\x y -> expr x yedit: fixed Haskell lambda, uses
->not=>