Haskell-Morte-Library icon indicating copy to clipboard operation
Haskell-Morte-Library copied to clipboard

Why lambda calculus. Why not LISP?

Open AnthonyJacob opened this issue 8 years ago • 3 comments

Isn't LISP better suited to be functional JSON?

AnthonyJacob avatar Sep 03 '17 13:09 AnthonyJacob

One of the requirements behind morte is that all expressions can be strongly normalized (even functions), which implies that morte must be a total and typed programming language. I'm not familiar with a total and typed way to implement LISP

Gabriella439 avatar Sep 03 '17 16:09 Gabriella439

LISP means many things. If you mean something like Common Lisp, Clojure or Scheme, they're nowhere near as simple as Morte, and don't have the same modularity of Morte terms (because of global state and side effects).

@Gabriel439 mind the untyped λLA-calculus and the λEA-calculus are strongly normalizing, and elegantly so (expressing exactly the terms of poly and elementary time complexity, resp.). There are other benefits of a type system, though, they contain precise information on what your term is and what inputs it expects.

For example, when you receive a render : State -> VirtualDOM function on Moon (or Lisp, or whatever), how do you know if it actually implements a State -> VirtualDOM function? There is no way and it could be something completely different.

VictorTaelin avatar Sep 03 '17 20:09 VictorTaelin

@Gabriel439 Lisp sort of is a Lambda Calculus. I'm sure there is some way to express the Calculus of Constructions using Lisp syntax (I'm not sure if it would be worth it though).

Also see https://stackoverflow.com/q/3323549/1172541

ChristopherKing42 avatar Nov 16 '17 08:11 ChristopherKing42