Wednesday 1 April 2015

What separates programs from queries?

Sometimes the line is quite blurry between what is a program (or a programming language) and what is an expression. I'm not even completely sure what to call the second one, actually, but after reading about "runnable tweets" written in Wolfram Language and seeing the graphical plot results, it seems to me that these programs are more like search expressions or queries. They require a very rich interpreter with access to a lot of very complex data sets and extremely heavy functions to manipulate them. It's difficult for me to think of something like "GeoListPlot[GeoEntities[Atlantic Ocean, "Shipwreck"]]" as a program. It might be meaningful and unambiguous when interpreted against a particular data set, and clearly Wolfram can produce results from it, so I'm not sure what is my objection. Perhaps that there is only one system in the world that can run it? Well, that would be true of any very specialised software. I've written expression parsers that only my programs use, but I never called the input a program.

One objection might indeed be the power of the functions available. You could write a "language" whose only function is "List The Monarchs of England In Chronological Order", but is that input a program, or is the interpreter the program?

Maybe it's a size issue. Because of the massive scope of the language, and its inherent complexity, every program written in it will be many orders of magnitude smaller than the interpreter itself. I think that's what's bugging me.

Mokalus of Borg

PS - Plus there's something about the native data sets.
PPS - It doesn't feel like big, real-world data sets should be considered part of a programming language.

No comments: