Thread View: comp.lang.functional
2 messages
2 total messages
Started by Mark Allsop
Tue, 11 Jun 1991 08:13
overloading in SML
Author: Mark Allsop
Date: Tue, 11 Jun 1991 08:13
Date: Tue, 11 Jun 1991 08:13
16 lines
1193 bytes
1193 bytes
Can you overload operators in SML? I have Ake Wikstrom's SML book on my right which quite clearly states user defined functions can not be overloaded. On my left I have the preliminary SML reference manual which refers to 'abstractions' which look to me like they implement overloading, along with the use of signatures. Can someone tell me for sure if you can or can not overload your own functions in SML please.... +Mark. -- Mark Allsop Computer Scientist email: mallsop@suna.mqcc.mq.oz.au The Statistical Laboratory Phone: At MacUni: (61 2) 805-8792 / \ Macquarie University, Australia Fax : : (61 2) 805-7433 | This one goes up to 11.....
Re: overloading in SML
Author: Nick Rothwell
Date: Wed, 12 Jun 1991 10:54
Date: Wed, 12 Jun 1991 10:54
26 lines
1524 bytes
1524 bytes
In article <1030@macuni.mqcc.mq.oz>, mallsop@suna.mqcc.mq.oz.au (Mark Allsop) writes:
> Can you overload operators in SML?
No.
> left I have the preliminary SML reference manual which refers to 'abstractions'
> which look to me like they implement overloading, along with the use of
> signatures.
Abstractions aren't part of SML either. Some compilers (SML/NJ for example)
choose to implement user-level overloading and abstractions.
The SML reference manual you refer to is, I believe, a manual for a particular
implementation (SML/NJ) rather than the language, for which the "official"
reference is the Milner/Tofte/Harper book.
By all means, use overloading and abstractions if you want - they're useful -
but don't expect portable code.
Nick.
--
Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh.
nick@lfcs.ed.ac.uk <Atlantic Ocean>!mcsun!ukc!lfcs!nick
~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~
<-- WEST VIEWING ROOM EAST VIEWING ROOM -->
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