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!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Elaboration order handling (Was: Bug in 'gnatmake') Date: Wed, 19 Jun 2013 20:31:42 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <7f33982d-3bcf-452e-a3b3-3a0a28505ff1@x20g2000vbe.googlegroups.com> <87r4g0g9c0.fsf@adaheads.sparre-andersen.dk> <87ip1bg4z2.fsf_-_@adaheads.sparre-andersen.dk> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1371688303 11546 192.74.137.71 (20 Jun 2013 00:31:43 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 20 Jun 2013 00:31:43 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:o8lRVrXXrercWdtcB1bcTxDGUss= Xref: news.eternal-september.org comp.lang.ada:15851 Date: 2013-06-19T20:31:42-04:00 List-Id: "Randy Brukardt" writes: > "Robert A Duff" wrote in message > news:wccip1acmt5.fsf@shell01.TheWorld.com... > ... >> I don't see what the big deal is. Any legal Ada identifier can be >> represented as a Wide_Wide_String, and every Ada 2012 implementation >> supports the "<" operator on those. So one trivial solution is to >> simply sort based on that "<", in cases where the current rules about >> 'with' clauses and pragmas leave the order undefined. > > That doesn't work because Ada identifiers are case-insensitive, while "<" is > case-sensitive. You could get orders that depend on the case of the > identifiers, Groan. More proof of the theorem, "Nothing is simple." >...and in fact you could get children coming before parents. No, no. All the existing elab-order requirements would still apply. I'm suggesting only that we'd be better off if the cases where the current rules allow an implementation-defined order were language defined. Certainly a child package spec can't be elaborated before its parent spec! > A direct conversion to some specific case doesn't work portably in Unicode > (because it depends on what version Unicode you are using, while the > case-insensitive compare is guarenteed to work the same in all versions of > Unicode). Wait, are you saying that it's impossible to implement a case-insensitive sort in unicode? Such a sort is all that's needed here. Anyway, there's some "perfect/enemy/good-enough" thing going on here. Even solving the problem for programs that use only plain-old 7-bit ASCII would have saved zillions of dollars. > The net effect is that ordering is not very reliable in case-insensitive > Unicode identifiers, like Ada's. Cool, huh? Bleah. - Bob