Downsides to developing in Inform 6?

I’ve been playing around with both Inform 6 and 7, trying to get a feel for them. So far I strongly prefer Inform 6.

My question is: what exactly would I be leaving behind if I developed in I6 rather than I7?

Obvious things: the IDE and all of the features that come with it. Not a problem for me.

At first I assumed the library of extensions would be another one of the obvious things, but then I learned that I7 code is translated to I6 to be compiled, which lead me to believe that I7 extensions might be usable in some form in I6. Is this right?

In any case, what else would I be leaving behind?

(I’m sorry if I’m bringing up a well-trodden subject; I find googling for Inform related things difficult in general and got nowhere with this topic in particular.)

1 Like

Well, if I understand it correctly both Inform 6 and Inform 7 compile to the same exact game files.

So, really in the end all you’re missing out on is that some people have written extensions for Inform 7 and you won’t have exactly the same ones (although similar ones may be available). In fact, if you really wanted to, I believe it might be possible to insert Inform 6 code directly into an Inform 7 file. So if you wanted to you could have the best of both worlds.

You have relearn how to do very basic programmer-type things in i7, things that you normally don’t have to relearn in order to pick up a new language. Once you’ve learned however there is a lot more power at your fingertips. I can write functions in i7 that will only run on the 10th through 15th time any particular variable has changed. To do this in i6 I’d have to create a whole network of shadow count variables, and then manually trap every variable change; i7 just does this for me, behind the scenes, because I asked a question that requires it. The key I guess is knowing how to ask those powerful questions in i7 syntax. (I am not really very close to knowing them all, myself. I did make a concerted effort at one point but then took a large break and forgot so much of it that now I ‘relearn’ things by looking at my own previous code. You have to keep it up! It’s a unique skill.)

I think however that coding things in i6 is at least as technically capable. In fact I am working on an extension that I am coding in i6 (for use in i7) because it requires so much string massaging that it just would be unwieldy for me, still a relative beginner, to do in i7. Plus I’m porting it from LambdaMOO which looks a lot more like i6. Lots of reasons to still use i6 I think but I could be slightly out of date.

One of the biggest differences is how actions are processed.

I7 also has some cool things like regular expressions.

Powerful inline text substitutions. This doesn’t technically do anything you couldn’t do in I6, but it lets you do it faster and more efficiently - often by orders of magnitude. And variations in text are such a central part of IF design that this is, to me, a killer feature.

As Dannii said, the way actions are processed. I6 used an object-oriented programming style that wasn’t very well suited to IF development. (As your actions got more complicated, your action code turned into ornate trees of “if” statements that were hard to maintain.)

I7 doesn’t make this trivial, but I think it’s easier to manage.

This has been the sticking point for me with i7–I have a hard time composing concepts I’ve learned about the language into new concepts. I’ve never encountered this with a programming language before. In my more honest moments I accept that this is likely a problem with me, not the language.

I’m also finding that there’s just a lot of what seems like pointless busywork. Sometimes it feels a bit like making a spreadsheet by writing “The name is a header cell. Right from the name is a header cell called total. Down from the name is a value cell called…”. When I’m working with structured data, it makes sense to display and create it in a structured way, not using an inefficient and messy natural language.

Does this refer to i7’s rules and rulebooks?

Zarf knows more about programming than I do by at least two and possibly three orders of magnitude. However, I would quarrel with the notion that OOP is not suitable for IF. I feel it’s extremely suitable for IF.

My recollection is that he’s right about action code turning into ornate trees of “if” statements. But I7 action code can also turn into ornate trees of “if” statements.

One difference that no one has mentioned so far is that a compiled I6 game tends to be smaller than the equivalent I7 game. If you’re trying to fit your game within the confines of the Z-machine, you’ll quite likely find this difference significant. If you’re compiling to glulx, the difference is basically irrelevant.

Another difference is that in I6 you can more easily store your code in numerous source files. I7 is not really set up to allow multiple code files. (You can force it to compile multiple files by saving portions of your code as extensions, but I seem to recall that this has some disadvantages.)

To me, the most telling advantage of I6 over I7 is that the code syntax of I6 is not ambiguous or confusing, because it doesn’t try to imitate English.

The I7 community is actively supporting I7 with new extensions, which is an advantage. On the other hand, there are quite a few interesting I6 extensions in the Archive.

Indeed. That’s why Mike Roberts added this feature to TADS 3. It’s totally wonderful, and the I6 equivalent requires extensive use of a hammer and tongs.

In I6 actions can be handled on specific objects, or in the class hierarchy. I think what Zarf was getting at is that often the events we want to handle don’t fit nicely into that hierarchy. I7 makes it easy to make rules apply to different things no matter what kind (class) they are. To do the same in I6 would either require duplication of action functions across several classes, or else handling the action at the very top of the hierachy with some messy if statements to filter it.

Or in other words, I7 is brilliant at classifying and filtering! Making up new adjectives is a great way to concisely and precisely specify the behaviour you want.

Also, for verbs with two nouns, I6 is nonideal. Rules make it very easy to define action handlers when only one or both nouns are specified. I can’t actually remember how you do it in I6, but I remember it isn’t fun.

I don’t know. I have a theory that any ornate tree of “if” statements in I7 would be better refactored into rules. Especially with regards to actions: the system already provides a half-dozen rulebooks for every single action. The laws for sorting rules are robust and often create exactly the intended effect, if the rule preambles are sufficiently detailed.

There’s also the extreme conciseness and power offered by phrases and relations, which can make code very easily readable and maintainable. “After attacking Bob, now every dog owned by Bob which can see the player hates the player.” is an example I’ve seen offered here before.

It’s not you. You know English, right? You can obviously do complex natural-style language. Your expectations as to shape of the learning curve have just been determined by object-oriented languages. There is a definite structure of difficulty that most languages follow, but i7 doesn’t follow that at all, and it makes you feel like you are spinning your wheels and not getting anywhere useful at an early stage of learning.

You are used to learning a small instruction set very quickly and then exploring all the possible combinations of it, at leisure. For most of this process you have the comfort of feeling like you have relatively complete knowledge and are merely investigating applications. Not with i7. i7 has a much larger instruction set (especially when it comes to the variety of possible grammars) that you simply cannot pick up in a couple of days. Coming from OO, one has to accept that it is pretty difficult to know everything about i7, and that one HAS to start coding with incomplete knowledge about the language. This drove the obsessive-compulsive side of my nature, absolutely up the wall, absolutely up the wall, at first. I’m a completionist – starting any project without knowing everything I need to know before writing my first line of code, makes me feel naked and foolish.

If you can see your way past this mindset and code with incomplete knowledge about the system then you can get things moving and learn only what you need to learn, as you go (kind of the way I code for the everchanging, near-infinitely fractured web – I just look things up as I need them and don’t learn anything I don’t need, because I can’t possibly know everything – which also used to drive me up the wall back in the 90s, until I got used to it).

I started learning Inform 7, off and on, almost 3 years ago (with about a one year hiatus during which I didn’t code anything and forgot a whole bunch). I am pretty far from being fluent. Most coding questions posted in this forum, I would be unable to answer in a syntactically correct form without first looking at my own code. There is no way that I would still be at such an arrested stage 3 years (heck, even 3 weeks) into learning a new OO language. Partly it’s my own fault for putting it down for a while, but with an OO language, I’d be able to put it down as long as I like and pick it up again very quickly. I have picked up i6 multiple times after leaving it for years, and yes I had to relearn things, but it went so much more quickly. With i7 you really have to keep it up because it bears too little relation to any other language you might use (including English); you gotta refresh those i7 neurons specifically and regularly or they will shrivel up and die, or whatever neurons do when they are poorly interconnected. They go dark.

So Inform 7 is probably much easier for a non-programmer to get into and be able to start producing working code, but there is also no question in my mind that it is way harder for anyone to completely master. I’m pretty sure I never will. (And I’m not a huge fan of blaming myself in this kind of situation – especially since the unreachability of mastery relative to i6 seems clearly to be an inherent property of i7’s design.)

Probably the best advice for someone who has programmed previously and is learning i7, is that you will feel stupider than you have ever felt as a programmer, but don’t panic; it’s not you.

EDIT: Made multiple edits just now @ 7:07AM.

Inform 7: Always with the hating dogs!

  • Wade