Wednesday, June 22, 2016

Table-oriented programming

I'm fairly sure I've seen something along these lines before, but this came up on HNN this week and piqued my interest. (As usual, the "this reminds me of...." comments are a treasure trove of fascination.) (Also, it's not the first time it's been on HNN.)

So the idea is essentially that collections are poorly handled in ... basically all existing languages, including SQL. And you know, that's entirely true. But since Decl has essentially made tables a first-class object in the language (I mean, I just keep running into them, you know?) maybe it would behoove me to think more deeply on the whole issue.

This site is moribund - in fact, archived off GeoCities - but I should archive it to a project directory and see if I can distill out a few good principles to bake into Decl.

It's full of sound advice. Data dictionaries, for example - that's something that keeps cropping up in my notes, and has for years. Anyway, the author seems to have been a prolific opponent of OO programming on Usenet, and frankly not terribly well-regarded, but many of the ideas here are quite sound.

Here's an interesting sort of philosophical rumination on the matter: OOP Oversold?

My thoughts: essentially, any single way of approaching the problem of organizing software is just a view onto the semantic content. Sometimes OOP will be a great help (well - it's basically always a great help) and sometimes it's more natural to think in terms of tables, or a functional language, or what have you.

But they're all approximations. Like mathematics, there are myriad valid ways of looking at a given problem, and they're all true. Forcing your expression into a single paradigm will basically always fail, because there will be some meaning that has to be ignored in order to fit the framework.

The only way to get around that is to have a framework as closely aligned with natural language semantics as possible. Hence Decl.

Still, though. Tables. Gotta think about this.

Oh! Also, people keep mentioning Lua when talking about tables. A really quick Google doesn't tell me much about why (except that Lua calls its hashes tables), but some more in-depth investigation would probably be a good idea.

Saturday, June 11, 2016


Gherkin is a language used for "behavior-driven development", in which a restricted subset of English (or some other natural language) is used to describe the behavior of some software. Behat then tests it using a domain model, which I find interesting. It's part of the PHP ecosystem.

The idea is that you've got a description of usage scenarios that you can agree on with non-technical users. I think that's pretty cool. But also you've got a higher-level description of the program, which arguably is something the programming system should use and/or have access to. The descriptions there are clues to the semantic domains you're interacting with, so analysis of them should result in a reasonable semantic model of the program.

Anyway. Worth thinking about.