Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c++ Subject: Re: C++ named requirements as concepts Date: Fri, 27 Sep 2024 02:27:52 -0700 Organization: A noiseless patient Spider Lines: 42 Message-ID: <86h6a15tuv.fsf@linuxsc.com> References: <20240925131144.00004c38@yahoo.com> <20240925151723.00006aa3@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Fri, 27 Sep 2024 11:27:56 +0200 (CEST) Injection-Info: dont-email.me; posting-host="abc45fc1b62a735d371ae748216349f9"; logging-data="729841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18o5UDG6OJivnr3nbDxg1mbQXxDCgnufRk=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:2mG4k+FDqFJOfUmKyCK4KagysEU= sha1:eHsCtA2lBWiRdyR5wpzbiUGZxXQ= Xref: csiph.com comp.lang.c++:120410 Muttley@dastardlyhq.com writes: > On Wed, 25 Sep 2024 17:33:41 +0200 > Bonita Montero boringly babbled: > >> Am 25.09.2024 um 17:32 schrieb Muttley@dastardlyhq.com: >> >>>> I understand both types of polymorphism, you nothing. >>> >>> You don't have clue. ... >> >> And you have your own definition of polymorphism. > > Thanks for proving my point. A proper functional language has value > polymorphism (which clearly you don't understand) as well as type > polymorphism. > > https://chrisdone.com/posts/value-polymorphism/ Neither "value polymorphism" nor "polymorphism by value" is a common term. They mean different things. Polymorphism by value was discussed in a 1993 paper by Xavier Leroy. Value polymorphism, as it is described in the cited web page, is simply overloading of variables rather than functions. (Overloading is often called "ad hoc polymorphism".) Neither overloading of functions nor overloading of variables has anything to do with functional programming. Overloading might be supported in some functional programming languages (and it is in some non-functional languages, notably C++), but overloading is orthogonal to the notion of functional programming. Supporting polymorphism is not a pre-requisite either for doing functional programming or for a language being a functional language. There are plenty of functional programming languages that don't have facilities for polymorphism, as for example the original Lisp.