Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!news.mathworks.com!news.kei.com!nntp.coast.net!col.hp.com!news.dtc.hp.com!hplntx!hplntx.hpl.hp.com!gjr
From: gjr@hplgr2.hpl.hp.com (Guillermo (Bill) J. Rozas)
Subject: Re: expressiveness and strong type system?
Sender: news@hpl.hp.com (HPLabs Usenet Login)
Message-ID: <GJR.96Mar23135630@hplgr2.hpl.hp.com>
In-Reply-To: jgm@cs.cornell.edu's message of 21 Mar 1996 18:29:56 -0500
Date: Sat, 23 Mar 1996 21:56:30 GMT
Reply-To: gjr@hpl.hp.com
References: <OZ.96Mar14014447@nexus.yorku.ca> <GJR.96Mar20105605@hplgr2.hpl.hp.com>
	<BLUME.96Mar20155909@zayin.cs.princeton.edu>
	<GJR.96Mar21130522@hplgr2.hpl.hp.com> <4isopk$asi@baugi.cs.cornell.edu>
Nntp-Posting-Host: hplgr2.hpl.hp.com
Organization: Hewlett-Packard Laboratories, Palo Alto, CA
Lines: 26

In article <4isopk$asi@baugi.cs.cornell.edu> jgm@cs.cornell.edu (Gregory Morrisett) writes:

|   From: jgm@cs.cornell.edu (Gregory Morrisett)
|   Date: 21 Mar 1996 18:29:56 -0500

|   But Scheme does not allow you to define new types!  It's just one
|   big ML datatype, such as:
|
|	   datatype dynamic = Dynamic of ref value
|	   and Int of int | Real of real | Function of dynamic list -> dynamic
|	   | Cons of dynamic * dynamic | Vector of dynamic | Null

Some dialects do, namely those where records create new types on the
fly by "subclassing" a pre-existing record type.  If sufficient
operations on the generic record type are present, the generic utility
code can deal with them.  Now, you can say that they are not truly
"new", but I would have to disagree here.  

The question is whether you have a type tree or a type forest or
merely a linear array of leaves.  Scheme has a type tree rooted in
"object" whose only meaningful operation is identity.  ML has distinct
roots.  In ML you can create new roots.  In Scheme you cannot.  (At
least in some versions) you can add a new node to the tree.

Of course you can mimic a Scheme-like type system in ML, or on a
Turing machine if you wish.  I don't see what you are driving at.
