Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're simply wrong. That's not how the term "variable" works.

From http://en.wikipedia.org/wiki/Variable_(mathematics):

"Varying, in the context of mathematical variables, does not mean change in the course of time, but rather dependence on the context in which the variable is used."



While I agree with your philosophy of vocabulary here, I've read the Harper article too, it's valuable to state directly that everyone knows there's the _(Programming) article too and is simply disagreeing that its a "good" way to use the term. Anyone who isn't familiar with the distinction in terminology ought to consider what things a programming variable represents that a mathematics variable does not..


From http://en.wikipedia.org/wiki/Variable_%28programming%29

"The identifier in computer source code can be bound to a value during run time, and the value of the variable may thus change during the course of program execution. Variables in programming may not directly correspond to the concept of variables in mathematics."


It's wrong that it's "improper" to use the term "variable" for Haskell variables, since it is an established usage. This usage of "variable" occurs in the very first paragraph of Church's first paper on lambda calculus from 1931 in the motivation for the whole project!


Math doesn't have vars, only vals


That's a rather strange assertion, if you mean "variables" and "values." Math distinguishes between variables and values. Variables have different values. Values can be bound to variables. Sometimes we do math with mostly variables and few values -- that's called algebra.


I mean Scala vars can be changed during the program, while Scala vals can't.

    val y = Console.readInt
    var x = y + 1
    x = y + 2 //valid
    y = 5 //error, vals can't be changed in the same block




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: