A Tale of Two Languages

 in
Inform version 6 and version 7 are about as different as two languages can be, so your choice of which one to use for your next great game boils down to personal preference.

Scoring is another thing that Inform 7 simplifies. In Inform 6, you can give an object the scored attribute, but for custom cases, like awarding 2 points instead of the default 1 point, you need to track things yourself (i6:150-156). In Inform 7, the process is much easier (i7:105-106, Listing 6).

So, which version is best? If I had to choose my favorite of the two, it would be Inform 7, hands down.

I prefer Inform 7 not because I find Inform 6 difficult to use or because it's an unpleasant experience. On the contrary—Inform 6 is well designed and has excellent documentation for both beginners and advanced users. It also has some clear advantages—a main one being precision. Inform 6 will do exactly what you tell it to do. Inform 7, on the other hand, is less precise, and you sometimes need to fiddle with it to get it to do exactly what you want. This lack of precision is a result of how Inform 7 translates your code into Inform 6 prior to compilation—it has to guess at what you mean sometimes, and occasionally, it will get things wrong.

Despite some disadvantages, the reason that I prefer Inform 7 over Inform 6 is because I am more of a writer than a programmer. The closest I get to programming on a regular basis is bash scripting with a little PHP thrown in now and again. The natural sentence structure of writing something in Inform 7 is more intuitive to me than the C-like syntax of Inform 6. As a writer, I sometimes think to myself, “If when reading code I pronounce 'somevar=42' as 'somevar gets 42', why can't I write it that way?” I realize and accept that computer languages are as terse and precise as they are for many reasons, but I also think efforts like Inform 7 should be applauded and copied wherever and whenever possible.

The precision of Inform 6, as with other programming languages, is good in some instances, but bad in others. One misplaced comma or semicolon or bracket prevents your game from compiling, for example. Inform 7 is not exactly forgiving in this area either, but I find myself making fewer mistakes because of the flexible and natural way you're allowed to write.

Another big advantage of Inform 7 is the wonderful integrated IDE that comes with it, complete with excellent built-in documentation, a debugger and other tools. With Inform 6, compilation was a command-line affair that could be difficult to set up properly. I won't go into the Inform 7 IDE here, but if you are interested, see the two-part series “An Introduction to Gnome Inform 7” on the Linux Journal Web site.

With Inform 7, there's never been a better, or easier, time to create your own interactive masterpieces. So, find the key to the grate, and join me down underground. I'll be in a maze of twisty little passages, all alike, trying to find the bearded pirate who stole my gold—if the dwarf doesn't kill me first. XYZZY!

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The Link to the files

Anonymous's picture

The link in the magazine was incorrect. The files are actually located here:

ftp://ftp.linuxjournal.com/pub/lj/listings/issue174/10130.tgz

One other thing to keep in mind: if you want to compile the code, first remove the line numbering.

Looking for code...

augmentedfourth's picture

I'm also curious where the code is!

The Link was incorrect

Webmistress's picture

But is fixed now.

Katherine Druckman is webmistress at LinuxJournal.com. You might find her on Twitter or at the Southwest Drupal Summit

Ah... I had been trying to

augmentedfourth's picture

Ah... I had been trying to get the code from the link within the article, not the link at the end. The link in the article should be updated as well.

Unavailability of sources issue 174

Anonymous's picture

I know Linux Journal has been getting worse lately but this is the first time that the sources for an issue are entirely unavailable. The credit crash hitting linux journal already?

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix