From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public From: piercarl@sabi.demon.co.uk (Piercarlo Grandi) Subject: Re: OO, C++, and something much better! Date: 1997/02/16 Message-ID: #1/1 X-Deja-AN: 219201788 X-NNTP-Posting-Host: sabi.demon.co.uk X-Disclaimer: Contents reflect my personal views only References: <5de62l$f13$1@goanna.cs.rmit.edu.au> <32FB8B51.1759@concentric.net> <3302DB3E.F70@concentric.net> Content-Type: text/plain; charset=US-ASCII Organization: Home's where my rucksack's Mime-Version: 1.0 (generated by tm-edit 7.94) Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-02-16T00:00:00+00:00 List-Id: >>> "jsa" == Jon S Anthony writes: jsa> In article Piercarlo Grandi jsa> writes: piercarl> It names a particular implementation of that conceptual piercarl> function; the lexical item "+" names a particular conceptual piercarl> function in maths, not programming languages. The character piercarl> "+" names procedures in programming languages and functions in piercarl> maths... jsa> Just to be clear: "+" does not stand for some _particular_ function jsa> in mathematics. But it does, and sorry if I used the word "particular" improperly; I meant by it something "any definite"; ``maths'' is often rather precise, and which ``particular'' function "+" stands for must be very clear, but, as you write: jsa> It varies on context. Specifically, a) what the formal system is jsa> and b) what interpretation is being given to that system. It was also perhaps not clear that by "maths" I meant something like ``ordinary maths'', a not well defined but hopefully intuitively perceivable notion; for most any given procedure indicated by "+" computes *some* mathematical function, even if not necessarily the one indicated by "+" in most ``ordinary maths'' (one favourite example is that "+" between 'unsigned' operands in ``C'' computes the function ``addition module 2^N'' rather than addition on nonnegative numbers). piercarl> At times, BTW, I am not so sure that is such a good idea, for piercarl> while the function computed by the "+" procedure usually piercarl> somewhat resembles the function indicated by "+" in maths, the piercarl> details (and vital ones) are as a rule grotesquely different piercarl> (just consider addition of 'real's and of 'R'eals). jsa> Again - it depends on context. That's entirely correct, and exactly my point; as I wrote, "usually", not "always" or "never". However the cases where the function computer by some "+" procedure are exactly identicaly to the function dinciated by "+" in some branch of maths would tend to be few; one major factor is that procedures usually compute functions over finite domains/codomains, which is almost never the case in [``ordinary''] maths, and even in ``discrete'' maths. jsa> There are cases where the two will denote identical results. Well, this is actually quite impossible as literally written :-); the results of any particular "+" operation are in the domain of implementation entities, those of any articular "+" function are in the domain of mathematical entities. What you probably wanted to say is that it can happen that the function computed by some particular "+" operation is exactly the same as that meant by some "+" function in ``ordinary'' maths. Ues indeed, but I suspect that this is rare, for example for the reason given above; also given that the levels of discouse of procedures (implementations) and functions (maths) are so different, I feel that notational similarity can mislead, and indeed: piercarl> I often think that the constant attempt to make programming piercarl> languages resemble maths (and this includes functional piercarl> languages) are not quite useful: Lisp, properly written, seems piercarl> rather legible and yet does not quite resemble maths notation, piercarl> operator symbols and all that. jsa> Forget about the notation. That's irrelvant. The real problem is jsa> that _often_ (not always) the semantics are all wrong in those cases jsa> where they are "supposed to be the same or at least similar". Well, while what I have written expresses a similar sentiment, I would be so radical in saying that notation is so irrelevant. Actually it is irrelevant, but it is not _unimportant_, for programs are about communicating in textual form, and communicating by suggesting analogies that are more or less subtly flawed (e.g. having a floating point datatype called 'real' as in many languages) might confuse people. This is why I have expressed the idea that it might actually be useful to have rarther different looking notations for procedures and functions; it should matter, but I must confess that even I am constantly amazed by the fondness for terminological confusions that many people display; the major example is "OO", which many people take literally as being about objects, with dire consequences. Misnomers such as "OO" and notational devices *are* irrelevant, to those that see them as mere pointers to the concepts they label; but unfortunately nominalism is rampant. [ ... agreement, strangely enough :-). Omitted not to set a bad precedent :-) ... ]