As will have been evident, a guiding design principle for Inform was to imitate the conventions of natural language.
I think I would be a lot more sympathetic to this if “natural language” here didn’t in fact just mean “English”.
Basing a programming language off a natural language that is logical and consistent might actually be a good idea, but I don’t know of any actual attempts to try it. Basing a programming language on English is a terrible idea, because English is so terribly inconsistent, and you’re left guessing as to how the implementation is going to interpret a phrase where a human mind would have no trouble cutting thru the ambiguity. (Granted some of the ambiguity is inherent in natural language, but a good chunk of it is just legacy nonsense from our defective orthography. Tackling just the inherent ambiguities is hard enough without being stuck attacking both at the same time.)
The merits are: familiarity; […] conciseness, in that a lot of boring code becomes unnecessary; and perhaps a greater ease of expressiveness, because the lineaments of the language more closely follow our cognitive habits than would be true of, say, C++.
Using C++ as your measure of a non-natural programming language is quite the straw man; neither of these concerns have anything to do with the natural vs non-natural divide, just with good programming languages and bad programming languages. This passage seems to imply an unfamiliarity with non-natural programming languages which allow concise and expressive code.
Finally, it’s disappointing that this talk didn’t address the biggest problem in the Inform6->Inform7 shift: it changed from being free software to being another proprietary project.
Basing a programming language on English is a terrible idea, because English is so terribly inconsistent, and you’re left guessing as to how the implementation is going to interpret a phrase where a human mind would have no trouble cutting thru the ambiguity.
In my experience, the natural language design in Inform does pose problems, but not exactly for ambiguity in interpretation. It’s more that in English, there are multiple ways to say the same thing, even if they differ by a few words. Of course, in a programming language there may also be multiple ways to “say” the same thing, but there are far fewer possibilities. Inform pretends to be a natural language, but it’s really a programming language, and you still have to be very particular about how you say things. It does work most of the time, because Graham Nelson did a great job of phrasing things in a way that makes sense, but it’s very easy to write a sentence and then spend the next 30 minutes wondering why it fails to compile, only to realize that you left off one word. (Or, my favorite: if you want to tell Inform to do something each time the turn counter increments, you say it by writing “Every turn, do XYZ”. If you type “Each turn, …” instead, it won’t have any idea what you’re talking about.) While the same problems, of course, abound in traditional programming languages – syntax is always the first thing to trip up people brand new to a language – the Inform IDE doesn’t do a good enough job, in my opinion, of highlighting potential errors in real time. I’m a bit disappointed that Graham didn’t mention any of this.
One reason Inform hasn’t been open source in some years is that this infrastructure was such a mess. But not being open source is an existential threat right there.
One of the first “large” programs I wrote was a small game in Inform on the Amiga so many years ago. I’ve always been a big fan of interactive fiction (hence “lorddimwit”), but alas…I might be a good programmer but I am not a good writer.
I think I would be a lot more sympathetic to this if “natural language” here didn’t in fact just mean “English”.
Basing a programming language off a natural language that is logical and consistent might actually be a good idea, but I don’t know of any actual attempts to try it. Basing a programming language on English is a terrible idea, because English is so terribly inconsistent, and you’re left guessing as to how the implementation is going to interpret a phrase where a human mind would have no trouble cutting thru the ambiguity. (Granted some of the ambiguity is inherent in natural language, but a good chunk of it is just legacy nonsense from our defective orthography. Tackling just the inherent ambiguities is hard enough without being stuck attacking both at the same time.)
Using C++ as your measure of a non-natural programming language is quite the straw man; neither of these concerns have anything to do with the natural vs non-natural divide, just with good programming languages and bad programming languages. This passage seems to imply an unfamiliarity with non-natural programming languages which allow concise and expressive code.
Finally, it’s disappointing that this talk didn’t address the biggest problem in the Inform6->Inform7 shift: it changed from being free software to being another proprietary project.
In my experience, the natural language design in Inform does pose problems, but not exactly for ambiguity in interpretation. It’s more that in English, there are multiple ways to say the same thing, even if they differ by a few words. Of course, in a programming language there may also be multiple ways to “say” the same thing, but there are far fewer possibilities. Inform pretends to be a natural language, but it’s really a programming language, and you still have to be very particular about how you say things. It does work most of the time, because Graham Nelson did a great job of phrasing things in a way that makes sense, but it’s very easy to write a sentence and then spend the next 30 minutes wondering why it fails to compile, only to realize that you left off one word. (Or, my favorite: if you want to tell Inform to do something each time the turn counter increments, you say it by writing “Every turn, do XYZ”. If you type “Each turn, …” instead, it won’t have any idea what you’re talking about.) While the same problems, of course, abound in traditional programming languages – syntax is always the first thing to trip up people brand new to a language – the Inform IDE doesn’t do a good enough job, in my opinion, of highlighting potential errors in real time. I’m a bit disappointed that Graham didn’t mention any of this.
From the talk:
One of the first “large” programs I wrote was a small game in Inform on the Amiga so many years ago. I’ve always been a big fan of interactive fiction (hence “lorddimwit”), but alas…I might be a good programmer but I am not a good writer.