Old programmer blues

Inform 7 has most of the same functional programming pieces (e.g. conditionals, loops, etc.) that you would expect plus many that are in my limited experience unique to it. Some of the biggest differences between it and other languages ultimately derive from the virtual machines for which I7 compiles – some limits on functionality seem very alien and are hard to understand without looking at how the Z-Machine and Glulx represent information. The rest stem from the overall design of being rules-based instead of object-oriented. As a result, neither the fine nor gross picture looks very much like other popular languages, even though many of the mid-level features will seem familiar.

Understand that BASIC and I7 are almost incomparable – I7 is extremely high-level compared to BASIC, and most habits of programming from BASIC are probably best abandoned. For example, you can’t really create arrays in I7. Why not? Because just about anything for which you would want an array has been superseded by a higher-level construction. If you think you want an array so that you can create a lookup table for numeric color codes, for example, then what you really want is a new kind of value called color. Until you know something about the library of higher-level constructions that the language affords, the inability to declare an array seems like a gap in functionality.

Fortunately, the community (most especially @Zed in recent years) has done a lot to compile and organize the various wells of knowledge that have been produced. I would also recommend looking for many writeups on this forum by @drpeterbatesuk that lay out the fine details of various aspects of the system.

If you’re looking to be convinced about the basic soundness of I7’s approach, there is an article by Emily Short (Some Observations on Using Inform 7) which makes a pretty good sales pitch (on excellent authority!) for why Inform 7 is generically better than Inform 6, its more C-like precursor. Note that it was written in 2006, when Inform 7 was still in early public beta (3K27 to 3T38 era), so most of the wishes expressed at the end of the essay have since been realized.

For those who are still not convinced and/or want the best of both worlds, check out Code: Inform 7 for the rest of us for some pioneering work by Zed to bypass all that natural language nonsense while retaining I7’s core feature set.

7 Likes