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.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY,THIS_AD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-16 06:48:43 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dmytrylavrov@fsmail.net (Dmytry Lavrov) Newsgroups: comp.lang.ada Subject: Re: += in ada Date: 16 Oct 2003 06:48:42 -0700 Organization: http://groups.google.com Message-ID: <49cbf610.0310160548.502e673c@posting.google.com> References: <3F7316F7.219F@mail.ru> <49cbf610.0310101231.2358762a@posting.google.com> <49cbf610.0310150616.3503a1c4@posting.google.com> NNTP-Posting-Host: 213.248.15.64 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1066312122 11321 127.0.0.1 (16 Oct 2003 13:48:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 16 Oct 2003 13:48:42 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:981 Date: 2003-10-16T06:48:42-07:00 List-Id: 1:ADA already have "augmented assignment" because ada have "in out"!!!!!!!!!! 18k11tm001@sneakemail.com (Russ) wrote in message news:... > dmytrylavrov@fsmail.net (Dmytry Lavrov) wrote in message news:<49cbf610.0310150616.3503a1c4@posting.google.com>... > > 18k11tm001@sneakemail.com (Russ) wrote in message > > > > > > > OK, I can see how you could have misunderstand my point here, so let > > > me clarify. > > > > > > I am *not* claiming that augmented assignment operators (":+", ":-", > > > ":*", ":/") are good *because* 98% of programmers use them. What I am > > > claiming is that 98% of programmers use them *because* they are a good > > > idea. > > I simply can't understand difference. > > "Because of A,B is good" vs "B is good because of A" > > In both cases you're referring to A,to "prove" that B is good,right? > > And A="choise of 98%" ,so you're mean "be with 98%". > > The statements,"Because of A,B is good" and "B is good because of A" > are indeed equivalent. But that's not the distinction I was making. My > distinction is between "A is good because almost everybody uses it" > and "Almost everybody uses A because it is good." > > This is a very fundamental distinction, and its is also the source of > much subtle distortion. Let me give an example. > > I happen to believe that the war in Iraq was wise to pursue. A tyrant > was toppled, 25 million people were freed from a hideous tyranny, and > I believe that worldwide terrorism was dealt a massive (though > obviously non-fatal) blow. You can be sure that Osama bin Laden was is > not happy about the war and its outcome. > > You may not agree with me, but I did give two or three reasons to back > my position. I understand that there are arguments for the opposite > position, but I am offended when some anti-war protestor compares > George W. Bush to Adolf Hitler. > > I think those protestors are unpatriotic idiots. But here's the > critical point. I don't think they are idiots *because* they are > unpatriotic; I think they are unpatriotic *because* they are idiots. > The former would constitute simple-minded patriotism -- "My country, > right or wrong." The latter constitutes intelligent patriotism -- "My > country *is* right this time." Both mean same thing. "unpatriotic because idiots " are true only if 1:there are no patriotic idiots.(if false,idiot may be patriotic) 2:all idiots are unpatriotic.(same) are true. "idiots because unpatriotic" are true only if 2:all idiots are unpatriotic. (does not rely on "there are no patriotic idiots.".If all peoples are idiots,"idiots because unpatriotic" right as well as "idiots because humans") So "unpatriotic because idiots" is a more bad expression. I think,there are existant patriotic idiots as well as unpatriotic ones. So IMO,"they are unpatriotic *because* they are idiots" is a wrong expression,because there are many patriotic idiots. In any case,it's not about your +=. In += you're referring to 98% to prove that += is good.Or,to prove that += is good,you're referring to 98%. You're referring to surely correct thing(98%) to prove non-surely correct one.And in "unpatriotic because idiots " both things(unpatriotic and idiots)aren't surely true for me. > > Whenever someone criticizes the idiot protestors, the liberal media is > usually there to subtly imply that it is due to the simple-minded sort > of patriotism. But usually it isn't. > > I hope I made my point (considering how much time I just wasted on > this post!). Yes,now i understand. I _SPECIALLY_ readed book about marketing lingvo-psychology ;-). We have two things:A and B. And A is a well-known thing that don't need to be proved,and B need to be proved. Normally,i would write "because A,B",that truly explain my point of view. But if i will use form "because B,A", i'm deriving A,thing that don't need to be proved from B that really need to be proved,to say "if B is true,well-known A is right"(it only proves that my B can co-exist with A). It's simply speculation to use it as argumebt why B is true. "Because all cubes of real values is positive,r^6 is positive." where "all real values is positive" is a wrong thing that are "proved": in logically correct way :right thing(r^6 >= 0) are derived from wrong thing. If i will derive right thing,it does not mean that "source" are right too. You want to derive that "+= is a good thing" from "98%" And you're using thing that NEED to be proved to derive that "98% using it". You're proved that if statement "+= is a good thing" is true,"98%" are true too. But to go really mathematical way, you're need to prove that if statement "+= is a good thing" is _false_, "98% uses it" are false too. Example: If there are existant most biggest number, mbn+1 = mbn. We really can "derive" right things from wrong ones.And it's why there are no difference in "a is good,because b",and "b is good,because a" :we always hear from TVs: "because our product is good,lot of peoples worldwide uses it" it's mean "lot of peoples worldwide uses it,so you should think that our product is good". You're referring to 98% in both cases,so there are no difference how do you arrange words. You're saying "98% uses it because it's good",and it's mean that you're think_that_it's_good because 98% uses it. you're talking about "unpatriotic idiots" because they are unpatriotic, and i think so because you're does not talking about other idiots, the subject are "patriotism",not "idiotism".If subject are "idiotism",it's from "comp.sci.med". > > We are talking about fact that infix procedures are more readable, > > comparing a:+b with inc(a,b) ,right? What it have to do with > > efficiency? > > I've explained this ad nauseum already, so I'll just sum it up. For > user-defined types (vectors and matrices, for example), the augmented > assignment operators allow the programmer to define in-place > operations that do not need temporaries and extra copying as the > standard math operators do. > > Consider the common operation of scaling a vector, for example. I > could write > > vec := vec * factor > or > vec :* factor Explaining Nth time: you're have problems because a*bb*a. I don't: function mult(in a,b:matrix):matrix; procedure multleft(in out a:matrix;in b:matrix); procedure multright (in a:matrix;in out b:matrix); both calculates a*b and one stores result in a,another in b. I really have such procedures to work with 3d graphics. :X have nothing with efficiency because i always can use doXinleftplace(a,b); where doXinleftplace is a procedure. ADA already have "augmented assignment" because ada have "in out"!!!!!!!!!! > > The first form requires the construction of a temporary, the actual > scaling operation, then the copying back of the temporary to the > original vector. The latter, on the other hand, can be written to > avoid the construction of the temp and the copying back. > > And yes, it is possible for a "smart" compiler to automatically > implement the former with the efficiency of the latter, but current > compilers don't, and more complicated examples would be *extremely* > difficult for the compiler to optimize. N'th time: there are not a war with a:=a+b; and a:+b; There are war between inc(a,b); and a:+b; Inc(a,b) and a:+b are the same things for compiler!