Newsgroups: rec.arts.int-fiction
Path: gmd.de!xlink.net!howland.reston.ans.net!wupost!waikato!canterbury.ac.nz!huia!greg
From: greg@huia.canterbury.ac.nz (Greg Ewing)
Subject: Design of a New Language: 2
Message-ID: <CG96Mq.1xs@cantua.canterbury.ac.nz>
Nntp-Posting-Host: huia.canterbury.ac.nz
Reply-To: greg@huia.canterbury.ac.nz (Greg Ewing)
Organization: University of Canterbury, Christchurch, New Zealand
Date: Wed, 10 Nov 1993 01:54:25 GMT
Lines: 91

Abstract
========

This is rather long, so here's a summary of what I'm asking:

	1) Do you prefer static (compile-time) or dynamic
	   (run-time) type checking?

	2) Would you prefer a language with lots of special
	   adventury constructs (like Alan) or something
	   simpler and more general (like Tads)?

	3) Would Alan be a good starting point for my new
	   language?

Rambling
========

Well, I've spent the last few days doing a lot of thinking
about the design of my language. Unfortunately, most of it
has been in circles without much convergence. I'm going to
have to make some basic decisions before I can make any
more progress.

The first question I need to settle is: should it be
Alan-like or Tads-like? I'm not talking about details of syntax
here, but about what the underlying model is like. 

In Alan we have static typing, a fixed set of object types with
limited extensibility, and a language which has many special
constructs to make common things straightforward, but lacks
flexibility when uncommon things are required.

In Tads we have dynamic typing, a highly extensible type
system, and a simple and general language. Most of the default
behaviour is embodied in a quite large and elaborate class
library, and thus can - in principle - be extensively
customised.

There are a couple of issues in there which need to be 
separated out:

1) Static or dynamic type checking?
-----------------------------------

I tend towards favouring static type checking, because
it enables the compiler to find my more stupid mistakes
instead of having to wait until they cause an obscure
bug. It does, however, come at a price in flexibility.

Does anyone out there think that static type checking would
be too severe a restriction on their creativity?

2) Should the "smarts" be in the language or the library?
---------------------------------------------------------

This is supposed to be a *language for writing adventures*, so
it makes sense to include constructs designed specifically for
adventures. At the same time, more general facilities need to
be available.

To me it seems Alan provides a lot of good stuff, but is not
flexible enough. However, I'm not at all comfortable with the
opposite extreme taken by Tads. There's too much of an
'anything goes' feel about the Tads library for my liking.

This is made worse by the fact that the Tads library is not
particularly well documented. Alan may be rigid, but at least
it is fully documented and relatively easy to understand.

Does anyone else have a similar feeling?

Conclusion
----------

Currently I seem to be favouring something rather more
Alan-like than Tads-like. In fact I am thinking of starting
with Alan and using it as a base to experiment with extensions
and generalisations.

Since the source of the Alan system is not available, this
will require re-implementing it from scratch. Before I go to
that much effort, I'd like to hear if anyone has any alternative
suggestions.

So - do you have a better idea?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of Japan Inc.|
greg@cosc.canterbury.ac.nz	   +--------------------------------------+
