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 2002:a6b:a112:: with SMTP id k18-v6mr22892ioe.138.1530669598001; Tue, 03 Jul 2018 18:59:58 -0700 (PDT) X-Received: by 2002:aca:f495:: with SMTP id s143-v6mr21572oih.7.1530669597849; Tue, 03 Jul 2018 18:59:57 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1216102itj.0!news-out.google.com!z3-v6ni1221iti.0!nntp.google.com!u78-v6no1222561itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Jul 2018 18:59:57 -0700 (PDT) In-Reply-To: <9524b7ed-b3c4-4775-9e62-7455bf1633c1@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <70c11a71-3832-4f57-8127-f3f1c48a052f@googlegroups.com> <62e38ee4-f72f-4ed8-bef1-952040fb7f8d@googlegroups.com> <64d8b4a1-a92c-4b90-b95c-e821749de969@googlegroups.com> <887212304.552080112.848502.laguest-archeia.com@nntp.aioe.org> <87muvan83x.fsf@adaheads.home> <1449870001.552246132.581310.laguest-archeia.com@nntp.aioe.org> <1ce9b9c8-b9cb-4ff4-b4c7-fe4827fea15b@googlegroups.com> <1f634e80-a1e7-4fb1-8cdf-5db6a773f36d@googlegroups.com> <9524b7ed-b3c4-4775-9e62-7455bf1633c1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7180e44d-6e11-4df3-ae01-96829298c03c@googlegroups.com> Subject: Re: Strange crash on custom iterator From: Lucretia Injection-Date: Wed, 04 Jul 2018 01:59:57 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53555 Date: 2018-07-03T18:59:57-07:00 List-Id: On Wednesday, 4 July 2018 02:26:52 UTC+1, Dan'l Miller wrote: > > I know the difference between code points and octets and their arrays. = I was saying that UTF_String is > > not a valid subtype of String because String is Latin 1 and UTF_String = is a superset of 7-bit ASCII, not > > 8-bit Latin 1. >=20 > Well, there are 2 ways of looking at UTF-8: before versus after parsing. >=20 > is not a superset: > One is whether each 8-bit value in Latin-1 has the same value in the UTF-= 8 octet-by-octet representation =E2=80=A2prior=E2=80=A2 to parsing. Using = this analysis, all of the upper 128 values have a different meaning than in= Latin-1. You're answering a question that wasn't asked. =20 > is a superset: > But the other way of looking at UTF-8 is what character is represented by= the multi-byte encoding =E2=80=A2after=E2=80=A2 parsing. In this view, th= e lowest 256 values of Unicode/ISO10646 conform to Latin-1 (with some quibb= ling over whether the mark-parity control codes from 16#80 to 16#9F have pr= ecisely the same meaning versus reserved/unencoded at various editions of v= arious standards). And again, wasn't asked. =20 > > > > Am i wrong, should I just implement what I need on top of the stand= ard lib and just use the UTF* types in my code? What about unbounded_utf_st= rings? Just use the normal unbounded_string? It's not like it's going to be= checking for it to be correct utf8 is it, but I can't write an iterator fo= r that from outside the rts though. > > >=20 > > > There is no way to do it right in Ada for now. > >=20 > > What do you mean exactly???? >=20 > He means that it needs his extrapolation-of-Steelman-3-3F idea for compil= e-time tagged types that are not tagged records. I've just read it. Yeah, I agree that Ada should be able to extend records = with data, not functions/procedures, but I don't see how the lack of that i= s a hindrance to creating a decent unicode lib. The fact that he refuses to= answer such a simple question, i.e "WTF are you on about?" explains a lot.