IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Ah, that is because let is a special form
There are very few exceptions in the language. That is one of them. When you see something like:
\n(let ((First (gensym "FIRST-"))\n      (Second (gensym "SECOND-"))\n      (Sum (gensym "SUM-")))\n      .\n      .\n      .\n)\n

what is happening is that the expression is evaluated from the outside in. So Lisp notices that let is a special form, and the following expression is parsed according to the rules for that form.

Very, very few parts of the language are going to change rules like that. The other place where you get tripped up is that that macros or special forms can decide whether or not a particular term should be evaluated (or possibly should be evaluated multiple times). But just think about how you would write an if test, or a loop without that facility, and you see why it is needed.

So yes. let is going to be special in that way. And it is an inconsistency. But I can't think of a single language that doesn't have inconsistencies which are as big or bigger.

Cheers,
Ben
To deny the indirect purchaser, who in this case is the ultimate purchaser, the right to seek relief from unlawful conduct, would essentially remove the word consumer from the Consumer Protection Act
- [link|http://www.techworld.com/opsys/news/index.cfm?NewsID=1246&Page=1&pagePos=20|Nebraska Supreme Court]
New Not to get in too deep...
...if i haven't already, but let is a macro in Scheme of the form:
   (let (let ((var val)) body) => ((lambda (var) body) val)
Basically a form of a bound variable, with a macro for syntactic sugar.
     Why I find LISP hard to read - (tablizer) - (25)
         Scheme to the rescue - (ChrisR)
         Care to offer an example where there is some ambiguity? - (ben_tilly) - (20)
             Allowed in CLOS but not in Scheme - (ChrisR) - (16)
                 Care to show me the example? - (ben_tilly) - (15)
                     Lisp is a family of languages - (ChrisR) - (14)
                         Rethinking, reloading. :-) - (ChrisR) - (13)
                             Thanks for the confirmation - (ben_tilly) - (1)
                                 Special forms - (ChrisR)
                             just trying to learn - (tablizer) - (10)
                                 As far as I understand - (ChrisR) - (9)
                                     More on s-expressions - (ChrisR)
                                     Downsides of flexibility - (tablizer) - (7)
                                         Less flexible = good? - (ChrisR) - (6)
                                             Dejavu - (FuManChu) - (2)
                                                 I like big apps and I can not lie. - (ChrisR)
                                                 Language de jour - (ChrisR)
                                             Standards versus flexibility - (tablizer) - (2)
                                                 One of the problem is that by the time a comprehensive... - (ChrisR) - (1)
                                                     You are probably right, but I'll be long retired by then - (tablizer)
             A "Let" statement that sets a bunch of variables -NT - (tablizer) - (2)
                 Ah, that is because let is a special form - (ben_tilly) - (1)
                     Not to get in too deep... - (ChrisR)
         OT: Why is this in Scripting? -NT - (pwhysall) - (2)
             oh oh, I smell another fight over definition of "scripting" -NT - (tablizer) - (1)
                 :-) -NT - (pwhysall)

Kikkoman *punch*!
47 ms