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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Top 10 Worst C# Features Date: Wed, 14 Oct 2015 09:50:47 -0700 Organization: A noiseless patient Spider Message-ID: <87si5d1jiw.fsf@jester.gateway.sonic.net> References: <5cb5c989-4d12-41d8-88df-ab45988ba8a1@googlegroups.com> <87mvvla5ma.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1a9f5856d25720e42c135b990c70bebb"; logging-data="5015"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WWkvg02ngCc1hq4BqxfIF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:yaxOp8wxTE5BxujXib7g3C7AwRQ= sha1:9wAU8oJKZZJANqS3UziqKAa0pcE= Xref: news.eternal-september.org comp.lang.ada:27976 Date: 2015-10-14T09:50:47-07:00 List-Id: Ben Bacarisse writes: > Do you mean that there are reasons to permit !(a == b) and a != b to > have different values in some cases? I think he meant they should both return the same value, but it is ok if they don't use the same algorithm. Of course it may be possible for the compiler to optimize the first into the second. The idea is just that if (a != b) { ... } can be much faster than if (a == b) { ... } .