mallsop@suna.mqcc.mq.oz.au (Mark Allsop) (06/11/91)
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.....
nick@cs.ed.ac.uk (Nick Rothwell) (06/12/91)
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 -->