Thread View: comp.lang.functional
3 messages
3 total messages
Started by Dr Gerd Venzl
Thu, 13 Jun 1991 13:06
overloading, subtypes, and arrays missed in SML
Author: Dr Gerd Venzl
Date: Thu, 13 Jun 1991 13:06
Date: Thu, 13 Jun 1991 13:06
31 lines
2043 bytes
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
Re: overloading, subtypes, and arrays missed in SML
Author: Raul Rockwell
Date: Fri, 14 Jun 1991 05:03
Date: Fri, 14 Jun 1991 05:03
12 lines
1069 bytes
1069 bytes
Torsten Roessel: 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. Arrays are defined in the SML library. -- Raul <rockwell@socrates.umd.edu>
Re: overloading, subtypes, and arrays missed in SML
Author: Scott Draves
Date: Mon, 17 Jun 1991 21:46
Date: Mon, 17 Jun 1991 21:46
5 lines
810 bytes
810 bytes
In article <ROCKWELL.91Jun14000323@socrates.umd.edu> rockwell@socrates.umd.edu (Raul Rockwell) writes: Arrays are defined in the SML library. true, but they are statefull (like a ref). sigh.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads