Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!news.maxwell.syr.edu!newsfeed.frii.net!uunet!dca.uu.net!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: IF in c++ was String Manipulation Hell
Message-ID: <GF59x0.762@world.std.com>
Date: Mon, 18 Jun 2001 21:19:48 GMT
References: <3B370795@MailAndNews.com> <ant151922566fNdQ@oakseed.demon.co.uk> <3b2e1a7e.620724569@news.worldonline.nl> <rKrX6.17564$Dd5.3765735@ruti.visi.com>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 50
Xref: news.duke.edu rec.arts.int-fiction:88823

David Thornley <thornley@visi.com> wrote:
>Richard Bos <info@hoekstra-uitgeverij.nl> wrote:
>>Reputedly, Snobol made something of a speciality of string handling, and
>>could do just about anything. Never used it myself, though, so take this
>>with a grain of salt.
>>
>I used it.  The string handling was potentially amazing.  It had the
>ability to apply a recursive descent parser in one line.  In anything
>not closely associated with string handling, I'd much rather use
>FORTRAN 66 on punch cards.

Now we've gone full circle. Well, full circle back to where we were
a little bit back in the thread; from the Icon FAQ:

  Icon is the latest in a series of high-level programming languages
  designed to facilitate programming tasks involving strings and
  structures. The original language, SNOBOL, was developed at Bell
  Telephone Laboratories in the early 1960s. SNOBOL evolved into
  SNOBOL4, which is still in use. [...]  Although it has similar
  objectives and many similar capabilities, Icon bears little
  superficial resemblance to SNOBOL4.

However, this whole subject came up because mathew suggested that
C++, being lousy at strings, was a lousy choice for programming an
adventure.

This isn't the issue at all (as we've already noted that Inform is
not exactly world-class in this department either).  Obviously there
are issues about creating your own parser and world model, but in
terms of *language choice* for doing adventure programming, the
important factor is that traditional languages are designed around
manipulation of quantities of entities that are all "the same".

Even in a heavily inherited, very-heterogenous language like
Smalltalk, you're still dealing with tens of GUI elements or
hundreds of simulation elements that all play by the same basic
rules. They may have parameterized exceptions--a la attributes
in Inform--but they have nothing resembling the "every object
behaves entirely differently" that most IF has.

Moreover, the vast majority of quality IF uses the same language
to code the library as to code the game, so the language needs
to be powerful enough to handle the needs of many "regular" objects
in sophisticated ways (for the library) and of some significant
number of "exceptional" objects (for the game). There are, as far
as I know, no traditional languages that make this possible;
certainly C++ does not deliver on this front. Simply defining
an initialized unique object is clumsier than one would like.

SeanB
