12 ms·
Yes, but don't overlook the "Let x =" syntax of mathematics. Programming has just dropped the "let". So, really there is a choice to be made about how to resolv
by mattmcknight 17y ago
Yes, but don't overlook the "Let x =" syntax of mathematics. Programming has just dropped the "let". So, really there is a choice to be made about how to resolve that ambiguity in a language parser. Visual Basic has the nice case of A = B = C setting A equal to the boolean expression B = C.
- greggraham 17y agoOld versions of BASIC used LET for assignment, but Microsoft BASIC and other BASICs of that era dropped it as being unnecessary.
- jules 17y agoLet in mathematics doesn't really work that way. It's more general. "Let <boolean expression>" means that the world gets set up so that the boolean expression is true. Examples: Let x=4 Let epsilon>0 Let a in A There's very interesting work on providing an iteration construct like this in a programming language. http://www.cs.cornell.edu/Projects/jmatch/ http://www.cs.cornell.edu/Projects/jmatch/
- Hexstream 17y agoNot completely, Lisp uses let for variable bindings... (let ((x 5) (y 10)) (+ x y)) => 15