Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!eerke From: eerke@cs.kun.nl (Eerke Boiten) Newsgroups: comp.lang.misc Subject: Re: On whether C has first-class composable functions Message-ID: <2677@wn1.sci.kun.nl> Date: 23 Jan 91 11:08:41 GMT References: <442@data.UUCP> <4408:Jan421:44:3391@kramden.acf.nyu.edu> <298@smds.UUCP> <1991Jan22.200615.4518@dirtydog.ima.isc.com> Sender: root@sci.kun.nl Organization: University of Nijmegen, The Netherlands Lines: 20 OK everyone, it's time to start the polymorphism vs. overloading war again! In article <1991Jan22.200615.4518@dirtydog.ima.isc.com> karl@ima.isc.com (Karl Heuer) writes: >In article Benjamin Chase writes: >>[defend the idea that compose() should be polymorphic] >Well, if you put it that way, then C doesn't even have a way to write a >function% to add two numbers together, since you have to decide at compile-time >what the domain and range will be. Addition is *not* polymorphic. There is no obvious meaningful interpretation of the addition of two characters, for instance (I suppose C has one anyway :-)). Addition is (in languages with various "types" of "numbers") an *overloaded* term for a number of operations that implement in some cases the abstract addition operation on numbers, plus some odd things at the borderline of the type range or precision. -- Eerke Boiten Department of Informatics (STOP Project), K.U.Nijmegen Toernooiveld, 6525 ED Nijmegen, The Netherlands Tel. +31-80-652236. Email: eerke@cs.kun.nl