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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 00:52:28 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: status of Ada STL? Date: 18 Jun 2002 00:52:28 -0700 Organization: http://groups.google.com/ Message-ID: References: <3d0ce154_5@news.bluewin.ch> <3D0D4274.6C5E02F9@acm.org> <4519e058.0206170753.599fd771@posting.google.com> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1024386748 17834 127.0.0.1 (18 Jun 2002 07:52:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 18 Jun 2002 07:52:28 GMT Xref: archiver1.google.com comp.lang.ada:26213 Date: 2002-06-18T07:52:28+00:00 List-Id: dennison@telepath.com (Ted Dennison) wrote in message news:<4519e058.0206170753.599fd771@posting.google.com>... > 18k11tm001@sneakemail.com (Russ) wrote in message news:... > > Certainly "=" is better than ":=" for assignment, but if you don't > > In what way? > > Logically, its not better. The symbol comes from math, where it > designates an invariant equality of values, not a moving of values > from one temporary storage place to another. Using it for assigning > just confuses newbies who know algebra. For instance this series of > statements is impossible in algebra, but common in programs: > > A = 3 > B = 7 > ... > A = B > > This isn't just theory, I've seen it confuse quite a lot of people who > are new to programming. Anyone who is "confused" by this for long should find another profession -- like moving furniture. Immediately after the statement "x=3" executes, it becomes true in the mathematical sense, which is why it makes sense. > "=" also had the drawback that is it confusingly similar to the > operator people want to use for true equality (becuase that is what it > *should* be used for, being the most analagous to the mathematical > symbol it comes from). I agree this is a problem, albeit a very minor one. The rational for using "=" for assignment rather than equality testing is that assignment is done far more often than equality testing. > So what are the advatages that counterbalance these disadvanteges > enough to make it "certianly better"? I've yet to see you name one. The "disadvantages" you listed are so minor as to be frivilous in my view. The advantage that I thought I had made clear is that "=" is simpler and cleaner than ":=" -- which is why it is used by most languages for assignment. Simplicity should not be underrated. You claim that people don't like ":=" because they are not "used to it." Well, that may be part of it, but I think you are defending it mainly because you are "used to it." That's your perogative, of course, and I wouldn't dream of trying to make you change. If you prefer ":=", then you should certainly not be forced to use "=". All I am saying is that I prefer "=" and I think many others would too. Can't we all just get along?