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: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: jsa@alexandria (Jon S Anthony) Subject: Re: OO, C++, and something much better! Date: 1997/02/22 Message-ID: #1/1 X-Deja-AN: 220581865 Distribution: world References: <5de62l$f13$1@goanna.cs.rmit.edu.au> Organization: PSI Public Usenet Link Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-02-22T00:00:00+00:00 List-Id: In article piercarl@sabi.demon.co.uk (Piercarlo Grandi) writes: > jsa> I think what you really want to say is simply that you don't think > jsa> the standard mathematical usage is appropriate in the context of PL > jsa> definitions. > > Not at all: I don't think that the use of the word "operator" as a short > form of "operator function" is what people mean by "operator" on its own. What people? Where's the evidence? Certainly in mathematics it is _common_ practice to use the word "operator" as short for "operation" (aka, your "operator function"). > There in maths operator symbols that do not label operator functions; > viceversa there are operator functions that are not labeled by an > operator symbol. So what? You are all hung up on syntax and glyphs. Glyphs _can_ be important - no doubt about it. But that importance does not extend to the _definition_ of the concept involved. > I am discussing what makes a symbol into an operator symbol > (distinguished syntax and usually lexicon); Alan when a procedure > should be called an "operator", even if is name does not at all look > like an operator. So? None of this conflicts with what I said: you don't want to use the standard mathematical definition in PL/CS land. Fine. And mathematicians don't want to use your goofy definition based on syntax and glyphs. > In my view 'sizeof' is an operator; he seems to be arguing that > > (lambda (x y) (+ (^ y 3) (+ 2 (* y (* e y))))) > > is an operator because it computes an operator function. I can't speak for him, but I don't think you have this even close to right. No one is talking about functors. > jsa> That's only because you've become attached to this idea that > jsa> operators and operations are some how defined by their "looks". > > Well, of course, because we are discussing operaror _symbols_, not > functions or procedures. The discussion arose out of discussing "+", if > I remember well. What do you mean "of course"?? And of course we are discussing _both_ because if we weren't there would be nothing to say. > jsa> Not so. If anything, it is the other way around. The semantics > jsa> come first and if it is deemed "special enough" to call out in a > jsa> certain context, a particular distinctive symbol (and much more > jsa> rarely, syntax) is chosen. > > But no! As you argue a few lines below, mathematicians use special But yes. That is exactly how it happens in mathematics. > syntax and lexicon to label functions that are not operator functions!; Sure. So what? > piercarl> examples and draw general rules. In maths operators are > piercarl> symbols that essentially always have some distinguished > piercarl> syntatic role, and very often are drawn from some > piercarl> distinguished lexicon too. > > jsa> Sorry, this is just is not true. The following are operators on > jsa> the set of Reals and none have any "distinguished syntax". > > jsa> f(x) = x^2 + pi*x^(1/3) > jsa> g(y) = y^3 + 2y*e^y > > No, these are two _functions_ that belong to the set of _operator > functions_. What do you mean, "no"? How is your characterization different than saying they are operations, i.e., functions which are operators? Or are you complaining about the fact that I used the term "operator" to refer to the operation (and not the glyphs)? In this particular context that would really be too much. > piercarl> I am not quite sure that syntactic/lexical shorthands actually > piercarl> help in programming, but most programming language designers, > piercarl> in the doubt, provide some sort of maths-like distinguished > piercarl> syntax for operators. > > jsa> it isn't obvious that this helps a lot in programming. > > Indeed! That is *my* point. In fact I think it is unhelpful. But then Fine. IMO, this is not very interesting. > there is an opinion that programs, in particular OO programs, ``model > directly the real world'', where the ``real world'' can be maths; and So? Depending on what you mean by "model" this might be true or it might be simply confused. Certainly OO people are more confused than not. But I don't think that has a lot to do with the glyphs being used and the syntax for combining them. > However I don't subscribe to that point of view; to me using > notation to suggest that 'class complex' and 'the Complex plane' are > in close correspondence is not such a good idea, and not very useful > in any case. The notation has nothing to do with it. That problem is a semantic problem - not a syntax problem. People can (and do) confuse a concept of a thing for the thing, confuse a word with its meaning, etc., etc. None of this has to do with syntax and glyphs. /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com