-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
As with the execution model, type systems are also diverse across different programming languages, and modeling the type system of your own language is as important as deciding on the execution model for the interpreter.The type system encodes the way in which the language will understand the possible values that can be stored and retrieved from memory, as well as which kinds of operations can be performed on them. The specifics of the type system define a lot of the choices for the language in terms of what operations will be cheap or expensive, and those will correlate with the level of abstraction that the language is able to present. The type system, in that sense, is the way in which the abstract machine for the language deals with values.In order to make this explanation easier to navigate, I want you to think of a type as a representation of the set of all possible values that could be represented. The memory in your abstract machine...