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!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: Strange crash on custom iterator Date: Wed, 4 Jul 2018 20:40:19 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 4 Jul 2018 20:40:19 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="e2afc3e788f3c40921cdc92cfee407d6"; logging-data="19641"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OY5P1q5n8fPVrFlDcKViEN3XIXAQqTLM=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:XZrXrFa+fy6NK9OEIt6T+wt8pnQ= sha1:w38+eIWLMRHEmkMcag4CSaY9aMQ= Xref: reader02.eternal-september.org comp.lang.ada:53618 Date: 2018-07-04T20:40:19+00:00 List-Id: Dmitry A. Kazakov wrote: > On 2018-07-04 21:02, G. B. wrote: >> Dmitry A. Kazakov wrote: >> >>> Back to the square >>> one, how to design an UTF-8 string type? >> >> Never. >> >> What is the proper representation of 3? > > What is 3 here? It names a value of some type. >> Which role does a UTF play, other than during I/O operations? > > UTF-8 is a preferable encoding for most text processing purposes. Like finding the number of characters that some Ada string has? > Should string types never be fixed, a quick and dirty solution would be > throwing wide string types away Maybe. Sort of works, in Java. > and declaring String with all its > bastards (Unbounded_String etc) UTF-8. I’d not want encoding here. >> Practically, that’s properly typed proper procedures, no? > > You lost me here again. A string to be output somewhere may need an encoding. (‘H’, ‘e’, ‘l’, ‘l’, ‘o’) does not need one to be useful, but output is performed by a value of type File * String * Encoding -> Void: a properly typed procedure.