This is called the let form and is used for "abbreviating".
On the other hand, in procedural languages ββthis is called a "variable declaration" because the cell of the variable "value" can mutate in the procedure languages. (In functional languages, it's just an abbreviation and is no different from just writing it first)
I can think of many languages ββthat use it in the source code written by the user of the language (Haskell, ML, Scheme, SBCL, Arc, ...), so I'm not sure how you have not seen it ...
Or did you mean only in Java?
let x = 2 in (x + 5)
Abbreviation for:
(\x (x + 5)) 2
which will ultimately be reduced to
(2 + 5)
where \ assumed lambda.
As for why this is in Java, not sure. What he should do is declare variables, so check if it is used there.
Danny Milosavljevic Dec 04 2018-11-12T00: 00Z
source share