From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-b.proxad.net!nnrp3-2.free.fr!not-for-mail Date: Sun, 10 Apr 2022 20:59:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Ada and Unicode Content-Language: en-US Newsgroups: comp.lang.ada References: <607b5b20$0$27442$426a74cc@news.free.fr> <86mttuk5f0.fsf@stephe-leake.org> <62515f7a$0$25324$426a74cc@news.free.fr> <3962d55d-10e8-4dff-9ad3-847d69c3c337n@googlegroups.com> From: DrPi <314@drpi.fr> In-Reply-To: <3962d55d-10e8-4dff-9ad3-847d69c3c337n@googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <6253290a$0$25333$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 10 Apr 2022 20:59:22 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1649617162 news-3.free.fr 25333 82.65.30.55:49263 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63731 List-Id: Le 10/04/2022 à 07:58, Vadim Godunko a écrit : > On Saturday, April 9, 2022 at 1:27:08 PM UTC+3, DrPi wrote: >> >> On the Ada side, I've still not understood how to correctly deal with >> all this stuff. >> > Take a look at https://github.com/AdaCore/VSS > > Ideas behind this library is close to ideas of types separation in Python3. String is a Virtual_String, byte sequence is Stream_Element_Vector. Need to convert byte stream to string or back - use Virtual_String_Encoder/Virtual_String_Decoder. > > I think ((Wide_)Wide_)(Character|String) is obsolete for modern systems and programming languages; more cleaner types and API is a requirement now. The only case when old character/string types is really makes value is low resources embedded systems; in other cases their use generates a lot of hidden issues, which is very hard to detect. That's an interesting solution.