3 ms·
The distinction in my mind was that a variable is something where mutation is allowed naturally without being explicit e.g. var a = 1; a = 2. In Scheme you have
by dcow 4y ago
The distinction in my mind was that a variable is something where mutation is allowed naturally without being explicit e.g. var a = 1; a = 2. In Scheme you have to opt in to the mutation by using a ! function set! which in scheme's world is like, in C++, const_cast-ing away the const from a pointer, or, in Java, using reflection to make a final field accessible and modify it. All possible using the languages as specified, but semantically not something you're normally encouraged to do.