6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 8.1.11 So what kind of object is a symbol? We can think of it as a Symbol: a primitive type primitive data object. Hence it doesn't really have a constructor.constructors or selectors, though quo te serves to help us distinguish None since really a primitive not an object with parts between the symbol and its value It does, however, have some operations. In particular, the None returns true if that object is a symbol any type, and dicate symbol? takes in an object of any type, and symbol? i type: anytype (symbol? (quote alpha))=>#t The operation eq? is used to compare two symbols(among discuss in a minute other things)and we will return to that in a second So here is our new data type for creating symbols, that is, data 4 6001S objects that refer to the name itself, rather than the value with which it is associated Symbol: printed representation Slide 8.1.1 To see how this data structure is handled, let's go back to our " two worlds"view of evaluation, separating the visible world of the user from the internal execution world of computation What happens when we consider symbols in this context? 6 001 SICP Slide 8.1.13 Symbol: printed representation First, remember what happened when we evaluated other expressions. For example, if the expression were a lambda expression, then the evaluator checked the type of this expression, realized it was a special form, a lambda, and used the rule for that particular special form. In this case, it would create the compound procedure represented by that expression, and return a pointer to that created object, causing the computer A compound proc to print out information identifying that pointer, i.e. some value associated with such an object6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 8.1.11 So what kind of object is a symbol? We can think of it as a primitive data object. Hence it doesn't really have a constructor or selectors, though quote serves to help us distinguish between the symbol and its value. It does, however, have some operations. In particular, the predicate symbol? takes in an object of any type, and returns true if that object is a symbol. The operation eq? is used to compare two symbols (among other things) and we will return to that in a second. So here is our new data type for creating symbols, that is, data objects that refer to the name itself, rather than the value with which it is associated. Slide 8.1.12 To see how this data structure is handled, let's go back to our "two worlds" view of evaluation, separating the visible world of the user from the internal execution world of computation. What happens when we consider symbols in this context? Slide 8.1.13 First, remember what happened when we evaluated other expressions. For example, if the expression were a lambda expression, then the evaluator checked the type of this expression, realized it was a special form, a lambda, and used the rule for that particular special form. In this case, it would create the compound procedure represented by that expression, and return a pointer to that created object, causing the computer to print out information identifying that pointer, i.e. some value associated with such an object