News for hackers. Stuff that matters.
Re:Reconsidering Functional Programming by Rusky on Monday May 04, 2015 @12:12AM (#9484265)
Does pure functional programming somehow not have "let ... in ..."?
Re:Reconsidering Functional Programming by ufo on Monday May 04, 2015 @12:54AM (#9484386)
Yeah, I'm not really getting the single-assignment bit. That kind of thing makes me think about effect systems and linear types instead...

In any case, let ... is basically syntactic sugar for lambdas.

    let x = a in b
is equivalent to

    (\x -> b)(a)
Other than aesthetics, the only reason to have a separate "let" syntax is to tell the typechecker that a function can be polymorphic.
Re:Reconsidering Functional Programming by bandrami on Monday May 04, 2015 @12:40AM (#9484343)
As a compile-time macro of sorts, yes (early LISPs just had (labels(...)), for instance).