UP | HOME

Some Classic Languages

The classic languages, which were created by math guys, and are mostly-functional have some “just right” properties.

Mostly and pure functional languages rely on symbol to a value bindings as in mathematics, instead of the imperative notion of a variable as a named location in memory.

In functional languages there is no notion at all of an uninitialized variable. All the bindings have values by definition. There is, in principle, no notion of a “location”. It is just a binding, as in math.

Well-designed imperative languages, like Go, are trying to address this fundamenal issue by defining “default values” for every type, so when one creates a variable (a location in memery) it automatically gets (initialized with) the default value.

All the structured types then automatically get the default values for all its “primitive type” members.

Now consider the dynamically typed languages like Lua or, god forbid, PHP. In Lua in particular one dynamically builds various data structures, which consists of both “variables” and “methods”, and this is the actual manifistation of the true strenght of this programming paradigm (Python is even more famous example).

What happens if you trying to access an undefined (yet) variable, which is the most common error in such languages? What will it be created? What value would it get? What would you do with that value? Are you expecting this particular value?

Unit tests would catch such errors, but as we know from experience, the dynamic structurally typed code is the mos buggy and annoing (look at these Lua modules for Neovim - it is a fucking disaster).

The Classic languages have not a single such issue, while languages made by narcissistic degenerates (Java, C++) cannot address these even with supposedly stratic typing. This is what the lack of mathematical maturity of the “designers” results in.

The point is that programming languages have lots of subtleties, but it can be just “done right”, as augmented with types arithmeric and algebra, and, ideally, even remain pure as the major principled goal of Haskell. Programming in these languages is writing mathematics instead of “commands”.

Steel Bank Common Lisp

  • Norvig and Graham books
sudo emerge --ask sbcl

Smalltalk

Seems like Pharo is OK

MIT Scheme

  • The CS 61A course (All you need is Lambda!)
  • Eric Crimson’s Scheme video course.
sudo emerge --ask mit-scheme

SML/NJ

  • The ML For A Working Programmer book
sudo emerge --ask smlnj

Erlang

  • Everyting by Joe Armstrong (R.I.P.)
sudo emerge --ask erlang

Miranda

  • the classic Bird & Wadler book
  • the classic WhyFP paper

GHC

  • All the classic books (Bird, Hutton, etc.)
sudo emerge --ask ghc

Ocaml

  • The CMU CS 3110 course (videos + textbook)
sudo emerge --ask dev-lang/ocaml

Scala 3

F#

  • Scott Wlaschin’s book

Author: <schiptsov@gmail.com>

Email: lngnmn2@yahoo.com

Created: 2023-08-08 Tue 18:39

Emacs 29.1.50 (Org mode 9.7-pre)