🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #1017

overloading, subtypes, and arrays missed in SML

#1017
From: Dr Gerd Venzl
Date: Thu, 13 Jun 1991 13:06
31 lines
2043 bytes
I've been wondering about the motivations for some decisions made in the
design of Standard ML. They concern a couple of useful concepts well known
from imperative languages, namely overloading, subtypes, and arrays. While
these could certainly provide there benefits in a functional setting as well
they have been omitted in the definition of SML.

Subtypes and (finite) arrays (if viewed as mappings from some finite subtype
to some element type) are closely related and a natural means of modeling
in many applications. Of course subtypes introduce problems for static type
checking but for the benefits they give me I'm happily prepared to pay the
cost of a little explicit typing.

Concerning overloading in SML the situation is even worse because it is
inconsistent. While it is used for a couple of predefined operators (together
with the need for explicit typing of expressions like op +) there is no way
for the user to introduce overloaded operators of his own. And while the
labelled record selectors of form #<name> are overloaded there is no way
to write an equally powerful selector using variable indices for direct
tuple element access. Instead you have to redo it using different names for
every single tuple type you need.

Could anyone point out to me the substantial reasons and problems that lead
to the omittance of the three named concepts in SML? Have these concepts
been embedded in other functional languages?

Please reply by email, I'll summarize.

Torsten Roessel
Siemens Corporate Research & Development
Design Automation Department
InterNet: roessel@ztivax.siemens.com
Technical Details
Message-ID: <5528@ztivax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!ztivax!corvara

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!ztivax!corvara
From: corvara@ztivax.UUCP (Dr Gerd Venzl)
Newsgroups: comp.lang.functional
Subject: overloading, subtypes, and arrays missed in SML
Message-ID: <5528@ztivax.UUCP>
Date: 13 Jun 91 13:06:16 GMT
Reply-To: roessel@ztivax.siemens.com (Torsten Roessel)
Organization: Siemens AG, Munich, W-Germany
Lines: 31