4 ms·
gcc’s IR, “GIMPLE”, is also commonly printed in s-expression form.
by tomjakubowski 9y ago
gcc’s IR, “GIMPLE”, is also commonly printed in s-expression form.
- Mikeb85 9y agoAs is LLVM's. I think JVM's might be too, but not 100% sure. Haskell is also pretty much just a lisp with a whole lot of sugar added on.
- eropple 9y agoHow is Haskell a Lisp? To me, a Lisp pretty necessarily needs to treat the structure of its code as mutable data, which seems kind of incompatible?
- dllthomas 9y ago> How is Haskell a Lisp? ... both communities care a lot about rose trees?
- dllthomas 9y agoIf you squint right, both monads and lisp S-expressions are rose trees.
- mattgreenrocks 9y agoThe evaluation model of both is quite similar though (reduction), and you can see it in the similarities between Core Haskell and Core Scheme. AFAIK, there are very few truly built in types in Haskell. Most everything can be built out of data constructors and functions. That idea of many things being in language user space is pretty Lisp-y IMO.
- lispm 9y agoThe evaluation model is different. Lisp is using strict evaluation and Haskell is using lazy evaluation. Haskell is statically typed, Lisp is not. Lisp uses s-expressions for writing programs, Haskell does not. Generally Haskell and Lisp are very different languages: in syntax, semantics and pragmatics (how the language is used).
- kazinator 9y agoNo, it actually doesn't; that is a common misconception. Lisp images can modify themselves at run-time by replacing global function bindings with new functions, not by mutating code. Lisp macros must not in fact mutate the incoming source code which they transform.
- Mikeb85 9y ago> How is Haskell a Lisp? The same way Lisp is a functional language. It has to do with how both languages are built from only a few basic primitives, and how both are based on Lambda calculus.
- eropple 9y agoAn ML is also not a Lisp, though.