6 ms·
Pure lambda calculus does scratch a weird itch I never knew I had. Someone recently made a super tiny language runtime based on these concepts. https://justine.
by _dh54 4y ago
Pure lambda calculus does scratch a weird itch I never knew I had. Someone recently made a super tiny language runtime based on these concepts. https://justine.lol/lambda/ https://justine.lol/lambda/
- JadeNB 4y agoThere's also Jot (https://en.wikipedia.org/wiki/Iota_and_Jot https://en.wikipedia.org/wiki/Iota_and_Jot).
- Koshkin 4y agoNot sure if that's completely true, but I have read somewhere that Haskell is nothing but a little bit of syntactic suger on top of pure lambda calculus.
- leifmetcalf 4y agoHaskell gets compiled to core (https://hackage.haskell.org/package/ghc-9.2.1/docs/GHC-Core.html#t:Expr https://hackage.haskell.org/package/ghc-9.2.1/docs/GHC-Core....) which is pretty similar to lambda calculus, but it has some additions like literals, let expressions, and case expressions.
- dreamcompiler 4y agoIt's true-ish, in many of the same ways Lisp can be described similarly. Pure lambda calculus is impractical except for pedagogy, so both Haskell and Lisp add enough knobs to make LC practical. The big differences are: 1. Haskell is lazy while most Lisps are eager. 2. Haskell automatically curries; Lisp doesn't. 3. (1) and (2) enable Haskell to have a very different syntax from Lisp which is largely free of parentheses. And they remove some of the need for macros in Lisp. Not all but some. 4. Haskell has static type analysis with Hindley-Milner. Lisp does type checking at runtime, and optionally a little bit at compile time but it's by no means a global type inferencer like H-M. So Lisp potentially runs a bit slower because of this, but Lisp can also handle edge cases for types that static analysis cannot (because of the halting problem). 5. Haskell encourages a side-effect-free programming style; Lisp neither encourages nor discourages side-effects.
- square_usual 4y agoI'm sure you already know this, but for the benefit of the uninitiated, Haskell's type inference isn't powered by the Hindley-Milner, but with a more advanced system called System F. It's a fascinating bit of computation to dig into, so I encourage anyone interested in typing to explore it further!
- dreamcompiler 4y agoDidn't know that. Thanks.
- kaba0 4y ago> because of the halting problem Correct me if I’m wrong, but aren’t types so-called “trivial properties “, on which Rice’s theorem doesn’t hold (and my thinking is that thus neither does the halting problem?). Though this perhaps depends on the type system in question (with dependent types being obvious counter-examples).
- Areading314 4y agoI've been coding professionally for about 10 years but I'm absolutely humbled every time I stumble on Justine's blog