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.

No comments:

Post a Comment