What is the precise definition of a computational object in SICP? Is it a value ? Is it an expression ? Its not quite clear to me, could you please tell me which is the correct meaning and explain why?
Could you please give examples in your explanation ?
I was trying to make sense of the terminology used in SICP by drawing a concept map (see below), but I got stuck with the meaning of computational object because I cannot decide whether the term refers to a value or to an expression?
EDIT:
Updated Concept Map after reading the answers:
I think the key in the in text that you've underlined:
A critical aspect of a programming language is the means it provides for using names to refer to computational objects. We say that the name identifies a variable whose value is the object.
A "computational object" is anything that can be the value of variable. Calling it a "computational object" as oppposed to simply an "object" probably just adds a bit of confusion here, since it's probably clear from context that non-computational objects (e.g., a piece of paper) can't be the value of a variable in a program. There are some things related to programs that aren't computational objects, either, though.
For instance, in Scheme, a variable isn't a computational object; you can't store a variable in another variable. In some languages, variables, or pointers, at least, are computational objects, and can be the value of a variable.
In the definitions in the text, we see source code (i.e., expressions). Evaluating expressions produces computational values that can be stored in variables. For instance, the expression (+ 2 3)
can be evaluated to produce the integer two, which gets printed as 2
. It's interesting to note, though, that in the Lisp languages (and more generally, in homoiconic languages), that source code can also be represented as a value. For instance, evaluating the expression (list '+ 2 3)
produces a list of the symbol named "+"
, the integer value two, and the integer value three. The list is printed as (+ 2 3)
.
So, we've got an idea of where objects are used, but what objects actually exist out there? This depends on the definition of the language. The definition of Scheme specifies some types of objects:
Other languages will provide other types, and Scheme may provide more than what I've listed here. The point is that what objects exist is something decided by the language designers, and the intent is to give enough primitive types so that a programmer can define whatever they need in terms of them.