In Context

12 points by veqq


veqq

Summary in progress

First, our prophet says the majority of programmers work on "information programs" where one e.g.:

Information programs have many concerns, mostly around keeping formats, correct procedures and channels, besides returning the right answer. He doesn't think static types are a good fit for these, but excel at inherently internal "mechanisms". Although this lends confidence when plugging in two things with the same connector, it doesn't work with information; if you had to change all your programs when you add a new column to the database... He notes that many things with different protocols work over eg. usb-c today; flexible systems expect us to get our data format wrong, but allow us to redo and overcome it. Successful, big systems are always dynamic (nature, internet).

How many languages do you use normally? Why use a language for this which just gives you mechanisms but not the basic ones you need every day like hashtables? You'll constantly be dealing with impedance mismatches, pipe together different formats. Clojure is good here (but some counterpoints.)

Then he returns to points from past talks.

Context is etymologically "weave together", i.e. the same as complex.

Checking keys in destructuring (via the :keys! "directive") helps with documentation (by requiring them) and helps you specify what you expect. "Breakage is bad." There's a fair bit of explanation about the new system with some new terminology like "binding list" directives.

More interestingly, he mentions that people expect schema things like spec to say something's wrong if you don't have so and so, but he rejects this brittle approach. Instead, he suggests this system says "you have to give me what I need". I think this is basically just saying that a hashmap or table with many keys/columns can change a lot, but programs work fine with it because they just look those up. He uses a selection within comments:

(let [{name ... }]
;; bindings
;;    name, city, nickname
;; selection
;;     :first-name, :address, :nickname, :id, :address -> :city, :zip

The -> means that inside :address he wants to see :city and :zip, the other fields should be in the root.


I agree with this idea, hence my obsession with tables via array languages. But if he's talking about "selection", why doesn't he make a select function? Rich seems so close. @internet_janitor implemented it well in Decker/Lil makes the case well in various places.