comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language
Date: Thu, 31 Aug 2017 15:16:11 +0200
Date: 2017-08-31T15:16:11+02:00	[thread overview]
Message-ID: <oo926q$1rj7$1@gioia.aioe.org> (raw)
In-Reply-To: 87val3aoly.fsf@jacob-sparre.dk

On 31/08/2017 14:49, Jacob Sparre Andersen wrote:
> Dmitry A. Kazakov wrote:
> 
>> You need a view of a string as an array of code points / unicode
>> characters *and* another view as an array of encoding items,
>> e.g. octet for UTF-8 or word for UTF-16 etc.
> 
> But the encoding stuff is (mostly) on the out-side of the application.

Not really. E.g. parsing is done in octets for obvious reasons. That was 
the reason why UTF-8 was designed this way.

> I don't mind having routines for mapping to and from various encodings,
> but the encoded types should not have character or string literals, they
> should just be arrays of octets with certain characteristics.

I don't understand this. What is the use of a string type without 
literals? Unbounded_String is a perfect example why this does not work.

It is all about having an ability to choose a representation (encoding) 
rather than getting it enforced upon you by the language. It is no 
solution if you simply create yet another type with the required 
representation losing the original type's interface and forced to 
convert forth and back between two types all over the place. This mess 
does not deserve consideration. We have it aplenty: String, Wide_String, 
Unbounded_String, char_array, chars_ptr ad infinitum.

> Don't worry so much about the encoding-view.  Push the encoding troubles
> to the edge of your application, and work in a consistent form inside
> the application.

Many, if not most, applications never care about code points. 
Applications deal with substrings starting and ending at the boundary of 
a code point. For them it is no matter if the substring is a chain of 
code points or a chain of encoding items.

>> You cannot handle this in present Ada.
> 
> You can, if you harmonize to a single encoding for the character and
> string view, and only see specific encodings as serializations of
> (subsets of) the general character and string types.
> 
> The places I expect to see trouble is if some source text assumes that
> Standard.Character and Interfaces.C.char are the the same.

It should assume Standard.Octet and Interfaces.C.char same. You simply 
cannot drop either encoding items or code points. It would never work.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2017-08-31 13:16 UTC|newest]

Thread overview: 228+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03  5:45 Community Input for the Maintenance and Revision of the Ada Programming Language Randy Brukardt
2017-08-03 12:06 ` Lucretia
2017-08-03 12:52   ` Lucretia
2017-08-09 21:08     ` Luke A. Guest
2017-08-09 21:12       ` Luke A. Guest
2017-08-10 14:43         ` Lucretia
2017-08-10 15:14           ` Dmitry A. Kazakov
2017-08-11  1:27             ` Randy Brukardt
2017-08-11  1:24           ` Randy Brukardt
2017-08-11  5:54             ` G.B.
2017-08-10  5:41       ` G.B.
2017-08-10 14:41         ` Lucretia
2017-08-10 15:25           ` J-P. Rosen
2017-08-10 15:42             ` Luke A. Guest
2017-08-10 15:44             ` Dmitry A. Kazakov
2017-08-11  0:56           ` Randy Brukardt
2017-08-11  1:10           ` Randy Brukardt
2017-08-11 22:43             ` Shark8
2017-08-12  2:40               ` Luke A. Guest
2017-08-11 14:42           ` Justin Sq
2017-08-11 14:48             ` jsquirek
2017-08-11 17:10               ` Luke A. Guest
2017-08-11 17:24                 ` Justin Sq
2017-08-11 20:09                   ` Dmitry A. Kazakov
2017-08-11 21:13                     ` Randy Brukardt
2017-08-18 21:06                       ` Robert Eachus
2017-08-31  0:49                         ` Randy Brukardt
2017-08-31  7:36                         ` Jacob Sparre Andersen
2017-08-31  9:52                           ` Dmitry A. Kazakov
2017-08-31 12:49                             ` Jacob Sparre Andersen
2017-08-31 13:16                               ` Dmitry A. Kazakov [this message]
2017-08-31 14:09                                 ` Jacob Sparre Andersen
2017-08-31 14:41                                   ` Dmitry A. Kazakov
2017-08-31 15:45                                     ` Simon Wright
2017-08-31 16:08                                       ` Dmitry A. Kazakov
2017-08-31 18:51                                     ` Georg Bauhaus
2017-08-31 23:54                               ` Randy Brukardt
2017-09-01  3:51                                 ` Justin Sq
2017-09-01  7:24                                   ` Dmitry A. Kazakov
2017-09-01 12:23                                     ` jsquirek
2017-09-03  1:17                                   ` Randy Brukardt
2017-08-18 20:33               ` Robert Eachus
2017-08-19  1:24                 ` Shark8
2017-08-19  8:55                   ` Dmitry A. Kazakov
2017-08-19 16:38                     ` Shark8
2017-08-19 17:09                       ` Dmitry A. Kazakov
2017-08-22  6:02                         ` Robert Eachus
2017-08-22  7:34                           ` Dmitry A. Kazakov
2017-08-26  4:41                             ` Robert Eachus
2017-08-26  6:29                               ` Dmitry A. Kazakov
2017-08-26  7:16                                 ` Jacob Sparre Andersen
2017-08-26  7:48                                   ` Dmitry A. Kazakov
2017-08-27 12:03                                     ` Robert Eachus
2017-08-27 12:35                                       ` Dmitry A. Kazakov
2017-08-27 14:44                                         ` Dennis Lee Bieber
2017-08-27 16:32                                           ` Dmitry A. Kazakov
2017-08-19  8:47                 ` Dmitry A. Kazakov
2017-08-10 12:18       ` J-P. Rosen
2017-08-10 12:40         ` Lucretia
2017-08-10 15:17           ` J-P. Rosen
2017-08-11  8:33         ` AdaMagica
2017-08-10 16:28       ` Pascal Obry
2017-08-10 16:52         ` Dmitry A. Kazakov
2017-08-10 17:08           ` Luke A. Guest
2017-08-10 17:25             ` Dmitry A. Kazakov
2017-08-11  1:02               ` Lucretia
2017-08-11  6:08                 ` Dmitry A. Kazakov
2017-08-11 20:51                 ` Randy Brukardt
2017-08-10 17:06         ` Luke A. Guest
2017-08-11  1:31           ` Randy Brukardt
2017-08-11  6:24             ` G.B.
2017-08-11  7:57               ` Stefan.Lucks
2017-08-11  8:34                 ` Dmitry A. Kazakov
2017-08-11  8:53                   ` Stefan.Lucks
2017-08-11  9:12                     ` Dmitry A. Kazakov
2017-08-11  9:22                   ` AdaMagica
2017-08-12 18:29                   ` Jacob Sparre Andersen
2017-08-29 16:01               ` Alejandro R. Mosteo
2017-08-09 15:24 ` Johan Söderlind Åström
2017-08-09 17:23   ` Shark8
2017-08-09 18:49     ` Dmitry A. Kazakov
2017-08-31  6:59   ` Jacob Sparre Andersen
2017-08-28 23:49 ` faryumg
2017-08-29  8:17   ` Simon Wright
2017-08-31 13:35   ` Johan Söderlind Åström
2017-09-02 10:49   ` Vincent DIEMUNSCH
2017-09-02 11:04     ` Dmitry A. Kazakov
2017-09-02 11:21     ` Johan Söderlind Åström
2017-09-02 15:22       ` Vincent DIEMUNSCH
2017-09-02 17:19       ` Jeffrey R. Carter
2017-09-04 20:52         ` Johan Söderlind Åström
2017-09-03  1:30       ` Randy Brukardt
2017-09-06 15:02         ` Johan Söderlind Åström
2017-09-06 15:57           ` Jacob Sparre Andersen
2017-09-06 18:56             ` Johan Söderlind Åström
2017-09-06 21:21           ` Randy Brukardt
2017-09-08 21:04             ` Johan Söderlind Åström
2017-09-08 21:46               ` Dmitry A. Kazakov
2017-09-08 23:55                 ` Johan Söderlind Åström
2017-09-16 12:49                 ` Johan Söderlind Åström
2017-09-16 13:10                   ` Dmitry A. Kazakov
2017-09-17 11:05                     ` AdaMagica
2017-09-17 12:51                       ` Dmitry A. Kazakov
2017-09-08 22:13               ` Jeffrey R. Carter
2017-09-10 21:09                 ` Johan Söderlind Åström
     [not found]                 ` <9d4274d7-5ad1-42d0-8ec3-de822e28ec6c@googlegroups.com>
2017-10-02 19:01                   ` Randy Brukardt
2017-09-08 23:07               ` Randy Brukardt
2017-09-09 20:35                 ` Johan Söderlind Åström
2017-10-02 18:57                   ` Randy Brukardt
2017-09-09 14:48           ` G.B.
2017-09-03  1:35       ` Randy Brukardt
2017-09-03 10:32         ` Alejandro R. Mosteo
2017-09-03 12:59           ` Dmitry A. Kazakov
2017-09-05 22:25             ` Randy Brukardt
2017-09-05 22:29           ` Randy Brukardt
2017-09-02 16:49     ` Jeffrey R. Carter
2017-09-03 10:34       ` Alejandro R. Mosteo
2017-09-02 17:08     ` Jeffrey R. Carter
2017-09-06 16:38       ` Vincent DIEMUNSCH
2017-09-06 20:52         ` Egil H H
2017-09-06 21:30         ` Randy Brukardt
2017-09-08 15:49         ` Jeffrey R. Carter
2017-09-03  1:28     ` Randy Brukardt
2017-09-06  6:15   ` Shark8
2017-09-01 14:11 ` Björn Lundin
2017-09-01 14:47   ` J-P. Rosen
2017-09-01 16:02     ` Dmitry A. Kazakov
2017-09-01 17:53   ` Jacob Sparre Andersen
2017-09-01 18:06     ` J-P. Rosen
2017-09-01 19:02     ` Dmitry A. Kazakov
2017-09-03  1:22   ` Randy Brukardt
2017-09-11 18:49 ` Tarjei Jensen
2017-09-11 19:33   ` Dmitry A. Kazakov
2017-09-12  6:18     ` Tarjei Jensen
2017-09-12  6:38       ` gautier_niouzes
2017-09-12  7:02         ` Tarjei Jensen
2017-09-12  7:15           ` Dmitry A. Kazakov
2017-09-12  7:35             ` Simon Wright
2017-09-12  9:23             ` J-P. Rosen
2017-09-12 10:07               ` Dmitry A. Kazakov
2017-09-12 16:30                 ` Shark8
2017-09-12 16:58                   ` Dmitry A. Kazakov
2017-09-12 19:30                 ` J-P. Rosen
2017-09-12 19:53                   ` Dmitry A. Kazakov
2017-09-12 10:44           ` gautier_niouzes
2017-09-12  6:39       ` Egil H H
2017-09-12  7:02         ` Tarjei Jensen
2017-09-12  7:42           ` Egil H H
2017-09-12  8:24             ` Tarjei Jensen
2017-09-12  8:35             ` Dmitry A. Kazakov
2017-09-12  9:21               ` Egil H H
2017-09-12 10:22                 ` Dmitry A. Kazakov
2017-09-12 10:48                   ` Egil H H
2017-09-12 12:09                     ` Dmitry A. Kazakov
2017-09-12 12:56                       ` Egil H H
2017-09-12 13:14                         ` Dmitry A. Kazakov
2017-09-12 13:25                           ` Egil H H
2017-09-12 13:43                             ` Dmitry A. Kazakov
2017-09-12 14:07                               ` Egil H H
2017-09-12 15:59                                 ` Dmitry A. Kazakov
2017-09-12 14:36                               ` Egil H H
2017-09-12 15:55                                 ` Dmitry A. Kazakov
2017-09-12 16:15                                   ` Egil H H
2017-09-12 16:40                                     ` Dmitry A. Kazakov
2017-09-12 16:47                                       ` Egil H H
2017-09-12 16:59                                         ` Dmitry A. Kazakov
2017-09-12 17:03                                           ` Egil H H
2017-09-12 17:17                                             ` Dmitry A. Kazakov
2017-09-12 17:29                                               ` Egil H H
2017-09-12 19:14                                                 ` Dmitry A. Kazakov
2017-09-12 19:58                                                   ` Egil H H
2017-09-13  7:24                                                     ` Dmitry A. Kazakov
2017-09-13  8:13                                                       ` Egil H H
2017-09-13  8:57                                                         ` Dmitry A. Kazakov
2017-09-13  9:00                                                           ` Egil H H
2017-09-12 18:55                                       ` Simon Wright
2017-09-12 17:43                                 ` Jeffrey R. Carter
2017-09-13 13:07                                   ` Alejandro R. Mosteo
2017-09-13 16:34                                     ` Jeffrey R. Carter
2017-09-13 18:34                                       ` Egil H H
2017-09-13 19:41                                         ` Jeffrey R. Carter
2017-09-14 12:30                                       ` Alejandro R. Mosteo
2017-09-14 13:36                                         ` J-P. Rosen
2017-09-14 18:08                                         ` Jeffrey R. Carter
2017-10-02 19:53                             ` Randy Brukardt
2017-09-12 14:55                           ` Simon Wright
2017-09-12 16:04                             ` Dmitry A. Kazakov
2017-10-02 19:51                           ` Randy Brukardt
2017-10-03  7:48                             ` Simon Wright
2017-10-03  9:34                               ` G.B.
2017-10-03 10:11                                 ` Dmitry A. Kazakov
2017-10-03 13:25                                   ` G.B.
2017-10-03 13:56                                     ` Dmitry A. Kazakov
2017-10-03 20:24                                   ` Randy Brukardt
2017-10-03 20:20                                 ` Randy Brukardt
2017-10-02 19:45                     ` Randy Brukardt
2017-09-12 17:41       ` Jeffrey R. Carter
2017-09-12 21:04   ` G.B.
2017-09-13  7:30     ` Dmitry A. Kazakov
2017-09-13 17:39       ` G.B.
2017-09-13 19:34         ` Dmitry A. Kazakov
2017-09-14  6:57           ` G.B.
2017-09-14  7:33             ` Dmitry A. Kazakov
2017-10-02 10:06 ` reinert
2017-10-02 13:54   ` Jeffrey R. Carter
2017-10-02 14:56     ` reinert
2017-10-02 14:56   ` Dennis Lee Bieber
2017-10-02 15:02   ` G.B.
2017-10-02 16:23     ` reinert
2017-10-02 16:38       ` Dmitry A. Kazakov
2017-10-02 17:19         ` reinert
2017-10-02 17:39           ` Dmitry A. Kazakov
2017-10-02 19:10       ` Jeffrey R. Carter
2017-10-02 19:14       ` Jeffrey R. Carter
2017-10-03  3:30         ` reinert
2017-10-03  6:36           ` G.B.
2017-10-04 19:21             ` reinert
2017-10-04 19:33               ` Dmitry A. Kazakov
2017-10-04 21:45               ` G.B.
2017-10-04 22:04                 ` Dmitry A. Kazakov
2017-10-05  6:50                   ` G.B.
2017-10-05  7:21                     ` Dmitry A. Kazakov
2017-10-04 12:38 ` Daniel Norte Moraes
  -- strict thread matches above, loose matches on Subject: below --
2017-08-03  5:53 Randy Brukardt
2017-08-03  9:42 ` Dirk Craeynest
2017-08-03  9:52   ` Dirk Craeynest
2017-08-05  0:10   ` Randy Brukardt
2017-08-03 12:52 laguest9000
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox