What does it mean to allow quickly?

I learn fast, but I am not a native speaker of English and just want to ask what โ€œletโ€ means? I know its constant, but why is it not a minus? Is โ€œletโ€ an abbreviation of a word? I wonโ€™t die without knowing this, Iโ€™m just curious;) Thank you.

+6
source share
1 answer

There are other languages โ€‹โ€‹where let used as a keyword before declaring a variable, such as BASIC and LISP (or Scheme), and I suppose it was taken from there. This is not an abbreviation; this is the normal English word "let", used to introduce a command, as in "Let there be light"; in mathematics, it is customary to declare a symbol in the same way as in "Let x be the unknown number of years that we are trying to calculate."

To answer your question a little more fully, though: in my opinion, there is nothing in this word, which makes it especially suitable for constants. It seems they made an arbitrary choice. var makes sense for a "variable" that can change (get?), so now they just need a different word and they choose let . Personally, I think const would be better.

+19
source

Source: https://habr.com/ru/post/981237/


All Articles