Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!indri!lll-winken!uunet!mcvax!ukc!etive!lfcs!db From: db@lfcs.ed.ac.uk (Dave Berry) Newsgroups: comp.lang.misc Subject: Re: Polymorphism Message-ID: <1899@etive.ed.ac.uk> Date: 2 May 89 13:33:31 GMT References: <5957@pdn.paradyne.com< <1810@etive.ed.ac.uk< <5973@pdn.paradyne.com< <1834@etive.ed.ac.uk> <6000@pdn.paradyne.com> <1859@etive.ed.ac.uk> <6032@pdn.paradyne.com> Sender: news@etive.ed.ac.uk Reply-To: db@lfcs.ed.ac.uk (Dave Berry) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 41 > alan@rnms1.paradyne.com (Alan Lovejoy) writes: ><>It should be pointed out, however, that there is no inherent reason that ><>function-values cannot or should not be compared for equality. That depends on what you mean by equality. If you are happy for the expression "fn x => 1 = fn x => 1" to return false, then you can define equality by comparing the address of function in the computer. Logically, however, this isn't the definition of equality that one usually wants. In article <6032@pdn.paradyne.com> alan@oz.paradyne.com (Alan Lovejoy) writes: >In article <1859@etive.ed.ac.uk< nick@lfcs.ed.ac.uk (Nick Rothwell) writes: > >< let i = 1 >< in (let i = 2 in i end, i) >< end; > > >Of course. But there is a data structure (not "i") that IS being dynamically >updated in place in your example: the dictionary that maps names to values. That depends on the implementation, doesn't it? It's quite possible to implement a symbol table functionally, right down to special hardware if you want to take it that far. >Whether this updating actually occurs at run time or compile time is a feature >of the implementation, not a property of the language definition. It's nothing to do with run-time. The symbol table is in the compiler. Furthermore, your argument that something occurring in an implementation justifies a statement about the language being implemented seems completely bogus to me. Statements about a language should be judged by the semantics of that language, not by the way some people might choose to implement it on some hardware. "See, this is why I got off drugs. Who can tell the difference anymore?" Dave Berry, Laboratory for Foundations of Computer Science, Edinburgh. db%lfcs.ed.ac.uk@nsfnet-relay.ac.uk !mcvax!ukc!lfcs!db