Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!new From: new@udel.EDU (Darren New) Newsgroups: comp.lang.smalltalk Subject: Re: Polymorphism Message-ID: <13877@louie.udel.EDU> Date: 24 Apr 89 16:02:23 GMT References: <5957@pdn.paradyne.com> <80500053@p.cs.uiuc.edu> Sender: usenet@udel.EDU Reply-To: new@udel.EDU (Darren New) Organization: University of Delaware Lines: 25 In article <80500053@p.cs.uiuc.edu> johnson@p.cs.uiuc.edu writes: > >Alan, I like what you say, but I don't like your definition of polymorphism. >"Full polymorphism means that any component or aspect of a program, program >component or programming language must behave as a value." >Surely you don't mean that polymorphic languages require that syntax and >types are values, but they are both aspects of a program. What about the >run-time stack? Name bindings and scopes are not first class objects in >any common language. There are times when it would handy if they were. This is getting off the subject of Smalltalk, but there are indeed languages where name bindings and scopes are first class objects. In FORTH, the return stack is a first class object (almost), as are name bindings and scopes. PostScript has first-class name bindings and scopes. Smalltalk has name bindings, scopes, and run-time stack as all first-class objects. I'm currently designing a language wherein everything mentioned above (including types and syntax of the language) are first-class objects, able to be modified on the fly; this allows literals for new types, overloaded and dynamically bound functions, co-routines (just reassign the value of the return stack), new control structures, and so on. Sadly, it's not yet implemented enuf to know how efficient I can make it, especially given that I want it portable to just about everywhere with a C compiler. However, I would say that Smalltalk comes really close to being fully polymorphic according to the quoted definition above. -- Darren