2 ms·
> We don't have a name for what you call values, as they're either irrelevant, or nonexistant in most contexts, and barely mentioned. They do exist. Python has
by catnaroek 10y ago
> We don't have a name for what you call values, as they're either irrelevant, or nonexistant in most contexts, and barely mentioned.
They do exist. Python has va... errr... the-thing-for-which-we-don't-yet-have-a-name: small enough numbers, special constants and object references. And they are relevant, because these are the things that you can bind to variables, pass to and return from functions, etc. If you think they are irrelevant, you don't understand them well.
> However, we can't call them values, as that name is taken.
I won't quibble about names.
> Most CBV languages call them atoms,
C is call-by-value. No atoms. Java is call-by-value. No atoms. ML is call-by-value language. No atoms. Maybe by “call-by-value”, you mean “inspired by Common Lisp”? That's not what call-by-value means, though.
> but that doesn't fit because they aren't necessarily atomic.
Right. In fact, the whole point is to use compound ones whenever we can!
> Let's try... Symbolic value? It seems to work: a given symbolic value represents all other equivalent symbolic values, and it's value that behaves like the symbol type in most languages. So that works unless it's already taken.
A symbol is supposed to represent something else, but a va... errr... the-thing-for-which-we-don't-yet-have-a-name doesn't represent anything else. If anything, what I call representations are the ones representing something else.
I propose “mathematical value”. Not everything you call a value can be plugged into an equation, but mathematical values by definition can.
- jdmichal 10y agoWhy do you reference call-by-value? Call-by-value vs. call-by-reference (and the related value- and reference-type semantics) is entirely about the in-memory representation of parameters, and you have been very adamant that your definition of value does not depend on in-memory semantics.
- catnaroek 10y agoI was comparing call-by-value with non-strict evaluation strategies like call-by-name and call-by-need.