Newsgroups: comp.lang.c++,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!yale!zip.eecs.umich.edu!newshost.marcam.com!news.mathworks.com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!ix.netcom.com!netcom.com!milod
From: milod@netcom.com (John DiCamillo)
Subject: Re: Do not waste our time. Re: Smalltalk @ Operator in C++
Message-ID: <milodD5yGLp.5H3@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <3k7rdd$drs@News1.mcs.com> <patrick_d_logan.172.000FB864@ccm.jf.intel.com> <3kfhuq$o8b@News1.mcs.com> <hhernan2.90.000E0255@achp31.eld.ford.com> <3knlgs$6q9@News1.mcs.com>
Date: Fri, 24 Mar 1995 17:29:49 GMT
Lines: 109
Sender: milod@netcom20.netcom.com
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:119388 comp.lang.smalltalk:22102

jim.fleming@bytes.com (Jim Fleming) writes:
>In article <hhernan2.90.000E0255@achp31.eld.ford.com>, 
>hhernan2@achp31.eld.ford.com says...
>>In article <3kfhuq$o8b@News1.mcs.com> jim.fleming@bytes.com (Jim Fleming) 
>writes:
>>>From: jim.fleming@bytes.com (Jim Fleming)
>>>Subject: Re: Smalltalk @ Operator in C++
>>>Date: 18 Mar 1995 21:05:30 GMT
>>>In article <patrick_d_logan.172.000FB864@ccm.jf.intel.com>, 
>>>patrick_d_logan@ccm.jf.intel.com says...
>>>>In article <3k7rdd$drs@News1.mcs.com> jim.fleming@bytes.com (Jim Fleming) 
>>>writes

>>>>>How do I convert Smalltalk programs that heavily use the @ method
>>>>>selector to C++?
>>>>>
>>>>>For example,
>>>>>a := 150 @ 200.
>>>>>
>>>>>How do I do this in C++?

>>>>a = new Point(150, 200);

>>>It seems that several people have come up with solutions similar
>>>to the one shown above.

Perhaps there is a conspiracy.

>>>Can we conclude that the @ operator can not be used in C++?
>>>Is there any reason why?
>>>Do people really think that the above is "clearer".
>>>
>>>If Smalltalk programmers can do it *either* way then,
>>>        why do they choose to use the @ format?

>>If you post questions with a hidden agenda your are wasting the 
>>time of people that answer in good faith. If you like smalltalk, use 
>>it.

>There is no "hidden agenda". The question is valid and hopefully clear.

And it was clearly answered on several occasions (including the
one quoted above).  The best way to construct Point objects in C++
is:

  Point a = Point(150,200);

>The real problem appears to be that C++ people do not want to be
>"questioned". They have had a free ride for the past 15 years. Evidently
>few people took the time to ask questions and if they did they were
>sent to Cyberia.

>Actually in looking at all of the reponses I received to the above
>question, it occurred to me that C++ have wasted OUR time with their
>answers.

"OUR time"?  To what group are you referring?

>Instead of proving a very straightforward answer like,

>	"You can not do that in C++..."
>	"...that is a nice feature of Smalltalk and C+@..."
>	"C++ was designed a long time ago and is starting to
>		"show its age..."

While you may feel that the above answer is straightforward,
it is also incorrect:  You *can* create points in C++.  You
*can* overload an operator to do so (although it is a bad
idea).  Creating points with a binary infix operator is neat,
but not extensible.  C++ is *younger* than Smalltalk, although
it is based on an older language.

>Instead, most people avoid the question, give a "similar" solution
>in C++ and THEN proceed to waste our time by telling us why that
>solution is adequate...

Actually, many of the respondants took the time to explain
why the C++ solution is superior to the Smalltalk solution.

>even though no reasons can be given other
>than references to books that contain circular justifications similar
>to the original answers provided....

>	....the answer is "because isA because"

Also incorrect.  The reasons were hashed out here in nauseating
detail:
1) The "commercial at" character is not a valid C++ operator
   because many international character standards do not con-
   tain that character.
2) Arbitrary infix operators are not provided in C++ because
   they would clash with existing operators and comments, and
   because they were correctly considered "syntactic sugar"
   which would not improve the safety of the language.

>Let's look at who has wasted software engineer's time for the past
>15 years. Who are the people that have developed a language and
>continue to think that nothing is wrong that the String class has
>just been rewritten again since I started typing this posting...

>	..."who has been wasting who's time? (and money)"...

Woops, there's that conspiracy again.

-- 
    ciao,
    milo
================================================================
    John DiCamillo                        Pinin' for the fjords?
    milod@netcom.com                  What kind of talk is that?
