Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!sunqbc.risq.qc.ca!wesley.videotron.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!world!not-for-mail
From: buzzard@TheWorld.com (Sean T Barrett)
Subject: Re: [Dis]Advantages of IF languages
Sender: news@world.std.com (Mr Usenet Himself)
Message-ID: <GsB7wq.7E@world.std.com>
Date: Fri, 1 Mar 2002 19:38:49 GMT
References: <PhEf8.94381$B61.29383113@news1.rsm1.occa.home.com> <20020301112737.28795.00001830@mb-fo.aol.com>
Nntp-Posting-Host: shell01.theworld.com
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: trn 4.0-test72 (19 April 1999)
Lines: 56
Xref: news.duke.edu rec.arts.int-fiction:100880

OKB -- not okblacke <brenbarn@aol.comRemove> wrote:
>>- Parser and library.
>>I don't thing there is a reason why Inform's parser couldn't be translated
>>to C++, for example. This is an advantage of the status-quo, but not a
>>substantial one.
>     On the contrary, I think this is THE primary reason for choosing an
>IF-specific language over a general-purpose language.  There are very few
>people willing to undertake the massive effort of porting a parser and world
>model (the world model is just as important) to another system.  If someone
>were to create some kind of C++ setup with a parser and world model comparable
>to those of Inform and TADS (as well as some syntactic sugar), I think we'd see
>a fair number of people use it.  Not so much existing IF authors, but newcomers
>to the scene who already know C++.

I think this is actually fairly far off the mark. For most
authors, "what system should I use to write IF", the "there's
already a parser and library in system X" *is* a meaningful
and valid answer, yes.

But if we step back for a moment and look at the problem,
"what language (independent of libraries) is good for writing
IF", we see that essentially *every* bit of large-scale IF
development has been written in a custom language (other than
the LISP-derived languages): Adventure in Fortran used a little
mini-interpreter, as I understand it; Scott Adam's used a tightly
packed interpreted description; the Phoenix games use a custom
interpreted language; the Infocom games retargeted to the
Z-Machine; Inform and Tads and AGT probably account for way
beyond the vast majority of games at this point.

None of this is coincidence. If you ever sit down and try to
write a large-scale adventure "from scratch", not only do you
have to code a parser and a world model, which you can do just
fine in C, but you find you need to describe and characterize
lots and lots of objects. You can try to do that with C struct
definitions and perhaps lots of macros, but it will be clumsy,
and you'll almost certainly end up wanting to create some kind
of database or other clearer representation of that data. But
now, when you want to attach exceptional *behaviors* to the
objects, you have to write them in C code in your program,
not in the database, and it gets clumsy to debug. So maybe
you put a flag on the object, or perhaps a 1-digit code
suggesting which of several behaviors that object should have
in certain circumstances.

It's only a small step from a 1-digit-action code to adding
some primitive scripting capability stored *in the database*
with the object. From there it's only a small step until all
the code moves into the "database". (The LISPish languages
were the exception above because they *already* allow a rather
free intermixing of code and data.)

If anyone has any specific anecdotes of this process actually
occurring, I'd be curious to hear it.

SeanB
