Chapter 14: Implementing Operators and Built-In Functions
New programming languages are invented because occasionally, new ideas and new computational capabilities are needed to solve problems in new application domains. Libraries of functions or classes are the basic means of extending mainstream languages with additional computational capabilities, but if adding a library was always sufficient, you wouldn't need to build your own language, would you?
This chapter and the next discuss language extensions that go beyond libraries. This chapter will describe how to support very high-level and domain-specific language features by adding operators and functions that are built into the language. The following chapter will discuss adding control structures.
Adding operators and built-in functions may shorten and reduce what programmers must write to solve certain problems in your language, improve its performance, or enable language semantics that would otherwise be difficult...