Get the latest tech news
Finding and fixing standard misconceptions about program behavior
Standard Misconceptions About Program BehaviorPosted on 12 April 2024. A large number of modern languages — from Java and C# to Python and JavaScript to Racket and OCaml — share a common semantic core: - variables are lexically scoped - scope can be nested - evaluation is eager - evaluation is sequential (per “thread”) - variables are mutable, but first-order - structures (e.g., vectors/arrays and objects) are mutable, and first-class - functions can be higher-order, and close over lexical bindings - memory is managed automatically (e.g., garbage collection) We call this the Standard Model of Languages (SMoL).
Wherever the user makes a mistake, the tutor uses an educational device called a refutation text to help them understand where they went wrong and to correct their conception. The Tutor lets the user switch between multiple syntaxes, both so they can work with whichever they find most comfortable (so that syntactic unfamiliarity or discomfort does not itself become a source of errors), and so they can see the semantic unity beneath these languages. In addition, we have not directly studied the following claims but believe they are well warranted based on observations from this work and from experience teaching and discussing programming languages:
Or read this on Hacker News