A.2 Introduction

Python is a statically scoped language, uses an eager evaluation strategy, incorporates functional features and a terse syntax from Haskell, and incorporates data abstraction from Dylan and C++. One of the most distinctive features of Python is its use of indentation to demarcate blocks of code. While Python was developed and implemented in the late 1980s in the Netherlands by Guido van Rossum, it was not until the early 2000s that the language’s use and popularity increased. Python is now embraced as a general-purpose, interpreted programming language and is available for a variety of platforms.

This appendix is not intended to be a comprehensive Python tutorial or language reference. Its primary objective is to establish an understanding of Python programming in a reader already familiar with imperative and some functional programming as preparation for the use of Python, through which to study of concepts of programming languages and build language interpreters in this text. Because of the multiple styles of programming it supports (e.g., imperative, object-oriented, and functional), Python is a worthwhile vehicle through which to explore language concepts, including lexical closures, lambda functions, iterators, dynamic type systems, and automatic memory management. (Throughout this text, we explore closures (in Chapter 6), typing (in Chapter 7), currying and higher-order functions (in Chapter 8), type systems (in Chapter 9), and lazy evaluation (in Chapter 12) through Python. We also build language interpreters in Python in Chapters 1012.) We leave the use of Python for exploring language concepts for the main text of this book.

This appendix is designed to be straightforward and intuitive for anyone familiar with imperative and functional programming in another language, such as Java, C++, or Scheme. We often compare Python expressions to their analogs in Scheme. We use the Python 3.8 implementation of Python. Note that ąąą is the prompt for input in the Python interpreter used in this text.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.11.247