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!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!medsec1.medien.uni-weimar.de!lucks From: Stefan.Lucks@uni-weimar.de Newsgroups: comp.lang.ada Subject: Top 10 Worst C# Features Date: Wed, 2 Sep 2015 12:59:40 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-828560380-1441191580=:5314" X-Trace: pinkpiglet.scc.uni-weimar.de 1441192186 9834 141.54.178.228 (2 Sep 2015 11:09:46 GMT) X-Complaints-To: news@pinkpiglet.scc.uni-weimar.de NNTP-Posting-Date: Wed, 2 Sep 2015 11:09:46 +0000 (UTC) X-X-Sender: lucks@debian User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Xref: news.eternal-september.org comp.lang.ada:27686 Date: 2015-09-02T12:59:40+02:00 List-Id: --8323329-828560380-1441191580=:5314 Content-Type: text/plain; format=flowed; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Eric Lippert from the C# design team has an interesting article on the ten= =20 worst features of C#. At least eight of these have been solved in Ada. Did= =20 Jean I. time-travel into the future and learned from the C# mistakes, when= =20 designing Ada? Lean back and enjoy! http://www.informit.com/articles/article.aspx?p=3D2425867 BTW, the two issues that are, to some degree, applicable to Ada are #9 Comparison operators for your own arithmetic (e.g., for your own=20 rational numbers). In Ada, the "/=3D"-operator is automatically the negation of "=3D". Which i= s=20 great. But given "=3D", "<", and ">", why does one have to implement "<=3D"= =20 and ">=3D", as well. (Five Operators, where three would suffice.) (*) The situation with C# is even worse. You need to define/override at least= =20 nine methods. #2 Finaliz(ers) are fragile In Ada, the finalize procedure for an object can be called more than once,= =20 Finalize should rather not raise an exception, ... apparently, C#=20 finalzisers suffer from similar problems: "any time a finalizer runs, you= =20 could argue that the program either has a bug or is in a dangerous state,= =20 such as being shut down unexpectedly via a thread abort". The remaining eight C# issues have been solved in Ada. ------- (*) One might argue that two operators, e.g., "=3D" and "<" would suffice,= =20 rather than three. If neither A=3DB nor AB is obvious, isn't it? But not all sorts of "arithmetic", where you want to take comparisons,=20 have the property that either of A=3DB, A>B, AB nor AB. On the other hand, A <=3D B should never mean anything different from (A < B) or (A =3D B)! Similarly for A >=3D B. -------- I love the taste of Cryptanalysis in the morning! -------= - www.uni-weimar.de/de/medien/professuren/mediensicherheit/people/stefan-luck= s ----Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universit=E4t Weimar, Germany-= --- --8323329-828560380-1441191580=:5314--