3 ms·
Being imperative / functional is sort of orthogonal. The s-expressions that represent everything give you an immense power of composability, both in functions a
by nine_k 8y ago
Being imperative / functional is sort of orthogonal. The s-expressions that represent everything give you an immense power of composability, both in functions and in macros. You can define your own language in terms of Lisp in a way you can't in a Algol derivative.
I suppose that s-expressions and the ways to transform them when they represent a function application (that is, basically always) critically depend on lambda calculus. I can be wrong, though.
- darkpuma 8y agoAs I understand it, lambda calculus is strictly functional. I also think the relationship between s-expressions and lambda calculus is tenuous at best. If anything, it's s-expressions and lambda calculus that are orthogonal. You could use s-expressions as your notation for lambda calculus, but you could just as well not.
- lisper 8y agoYou are correct. S-expressions are a serialization format for trees and lambda calculus is a computational formalism. There is no inherent connection between them. You can have either one without the other. However, the two together make a really magical combination because each one is a sort of local maximum in its respective design space.
- dreamcompiler 8y agoOf course. Haskell is even more faithful to lambda calculus than Lisp (because it has automatic currying and no side effects) but it doesn't use s-expressions at all.