What can a language express, and what can it guarantee?
Factorial can be written without naming the function. That trick raises a harder question: if every program must terminate, can unrestricted recursion be allowed? Take that distinction into slides, libraries and language extensions.
Questions in this reading · 4
Can anonymous functions recurse and still guarantee termination?
Weirich derives a fixed-point combinator so a function can recur without a name. Wadler approaches the same operator from the other direction. Adding unrestricted recursion gives up the termination guarantee of the simply typed calculus.
Compare original passages and timestamps · 2
the function y calculates the fixpoint of an improver function.not using What's called the fixo operator that is unlimited General recursionCan presentation slides perform general computation?
Compare a deliberately minimal interpreter with a surprising construction inside slides. The decisive question is which operations the system can express.
Compare original passages and timestamps · 2
you only need these three lines that's turn complete actuallyessentially imitate any transition function of any other touring machineCan libraries grow a language?
If libraries can express new abstractions in ordinary code, the core language can grow through its users. Compare the facilities needed to make those extensions feel native.
Compare original passages and timestamps · 2
the new words defined by a library should look just like the primitivesthe idea is that distributed programming should just be a libraryDoes concise array notation make a language easy to extend?
Array operations can express a great deal in a few symbols. Integrating a new operation into the language raises a separate question about its rules and conventions.
Compare original passages and timestamps · 2
you'll notice that it contains no explicit loops and no temporary variablesnew words defined by the user do not look like language primitives at all.Try it on your own example
Before adding an expressive feature, name one guarantee it might cost you.