Python: The Good, The Bad, and The Ugly

Tuesday, August 16, 2022 • 1:00 EDT

Here I use Racket, but any similar dynamic language with matching (or, if in OO, virtual methods) would work to illustrate the key ideas. Of course, using Racket as our metalanguage, we could simply use hashes for environments. To avoid completely defeating the purpose of our exercise here, I have followed a bit of a trick to rely minimally on Racket as a metatheory: because many objects internal to the semantics (e.g., numbers, environments, and proofs) are represented purely symbolically (as S-expressions), we primarily rely upon Racket for S-expression equality and dispatch (matching). I do use Racket’s contracts to check certificates, though other implementations could defer this to the end or even elide checking entirely. When I began programming, I read a copy of Richard Steven’s “Programming in the UNIX Environment.” Ultimately, my early experimentations with C were a failure; however, I later read David Beazley’s “Python: Essential Reference,” and was quickly able to pick up the UNIX API via it’s much simpler (admittedly, largely due to Beazley’s writing) Python counterpart. After teaching my undergraduate PL courses in Scheme variants these past few years I have wondered if we can understand type theory’s operationalization (via proof objects) using a similar shift in perspective. Racket is not a particularly appealing implementation language for type theory and its pattern matching is not designed to scale to settings where higher-order unification is of concern to the user. Checking proofs for constants is easy. (kmicinski.com). Continue reading.



Related Hacker News news



You may also be interested in Mashups Donald Trump Sleep Coronavirus Controllers Portraits Spider FDA