4 ms·
> Delaying functionality is just one use of functions. This is why explicitly said Lambdas. Name one use of lambdas not covered by functions that is not delaye
by j-pb 8y ago
> Delaying functionality is just one use of functions.
This is why explicitly said Lambdas. Name one use of lambdas not covered by functions that is not delayed evaluation.
If you want to be pedantic please be so consistently.
> S-expressions know nothing about 'syntax'. Thus they can't be an AST.
You seem to be confusing what the CL Hyperspec calls syntax, which is actually the semantics of evaluating a certain expression list, with the actual parse tree that can be generated from M-Expressions. And you seem to confuse Abstract Syntax Trees which can contain pretty much anything with Concrete Syntax Trees generated by parsing (it's explained on the very wiki page you linked). And even IF they were the same, M-Exps themselves are so flexible that they can express everything as function calls and arguments, and since the original Lisp only had a single symbol type your (3 4 +) argument itself is flawed.
You're way to focused on how CL does things, maybe it's your CL background that actually causes you to miss the bigger picture of lisp, something you accuse the people of that come from Java.
- lispm 8y ago> This is why explicitly said Lambdas A lambda is a function. There is nothing special about them. There is nothing which makes them less or more functional than other functions. ((lambda (x) (* x 10)) 30) FYI: above is valid Scheme code. BiwaScheme Interpreter version 0.6.4 Copyright (C) 2007-2014 Yutaka HARA and the BiwaScheme team ((lambda (x) (* x 10)) 30) => 300 Above is lambda expression applied to an argument. There is nothing 'delaying' about it. > You seem to be confusing what the CL Hyperspec calls syntax, No, I'm looking at the Racket documentation. https://docs.racket-lang.org/reference/syntax-model.html https://docs.racket-lang.org/reference/syntax-model.html The reader in Racket reads expressions into syntax objects. In a second pass it then creates a complete parse. In an Interpreter based Lisp one reads the s-expression into an internal representation of lists, symbols, numbers. The interpreter then has the syntax encoded into its code and walks these lists keeping track of functions, variables, built-in operators, bindings, ... etc. That's pretty much what a Lisp interpreter did since the dawn of time. Two decades before CL even existed. Clojure even doesn't use an interpreter.