Go First-class functions ✔ ∗ ✔ ✔ ✔ First class types ✔ ✔ Iterators ∗ ✔ ✔ ∗ Variable model reference value* value and reference reference value* and reference Type checking dynamic static static dynamic static Type expression structural nominal nominal structural structural Functions as objects Classes as objects
Python* First-class functions are very common in the standard library •The sorted built-in key argument is one example. 76 * Yes, this is subjective. I am talking about style!
is common in Python •nonlocal was added in Python 3 to support it better Callable objects are uniquely Pythonic •Graham Dumpleton recommends callable classes as the best way to code decorators 77
features Choose among alternative implementations Make good use of design patterns Debug hard problems Emulate missing features when they are missing 79 Inspired by Programming Language Pragmatics Michael L. Scott *