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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.33.207 with SMTP id h198mr2062678ioh.9.1444809655719; Wed, 14 Oct 2015 01:00:55 -0700 (PDT) X-Received: by 10.182.19.166 with SMTP id g6mr6703obe.37.1444809655701; Wed, 14 Oct 2015 01:00:55 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!kq10no18394551igb.0!news-out.google.com!n2ni29756igy.0!nntp.google.com!kq10no21080015igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 14 Oct 2015 01:00:55 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=95.172.74.52; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 95.172.74.52 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5cb5c989-4d12-41d8-88df-ab45988ba8a1@googlegroups.com> Subject: Re: Top 10 Worst C# Features From: Maciej Sobczak Injection-Date: Wed, 14 Oct 2015 08:00:55 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:27970 Date: 2015-10-14T01:00:55-07:00 List-Id: > One of the bugs which I detected in Crap-Poo-Poo code which I referred > to in the paper referred to below involved two functions like these, > but they accidentally did not return values compatible with each > other. I explained this to Crap-Poo-Poo advocates involved, but they > lacked sufficient intelligence to comprehend a reason as to code > cloning producing a bug. Apparently you have talked to wrong advocates. For the sake of discussion I will play that role in this post. Yes, we understand that it is possible to have incompatible implementations= of operator=3D=3D and operator!=3D in C++ (assuming that this is the langu= age you are referring to), but we are willing to take this risk (and addres= s it by other means) as it allows us to implement these operators more effi= ciently. One possible example where this could be possible is when the encapsulated = data has a digital signature or some other short digest available with the = property that when two digests are different then the objects are surely di= fferent (and this can be determined very quickly), whereas when the digests= are equal then more work is needed to determine whether the objects are eq= ual, too. In this case, our operator!=3D can be much faster than operator= =3D=3D and we are willing to benefit from the optimization opportunity here= . This could not be possible if one is automatically derived from the other= . > I also advised that Ada does not do > this. Yes, we know that Ada prevents some optimization strategies. This is not th= e only one. > They persisted with Crap Poo Poo. Yes, we prefer to get better performance at the expense of higher verificat= ion effort. If you are willing to address the above, please use the actual name of the = programming language that you are referring to. --=20 Maciej Sobczak * http://www.inspirel.com