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: Sat, 19 Aug 2017 19:09:04 +0200
Date: 2017-08-19T19:09:04+02:00	[thread overview]
Message-ID: <on9rbf$j5s$1@gioia.aioe.org> (raw)
In-Reply-To: 3f04ecdc-2672-4051-948f-37ce5446dbac@googlegroups.com

On 2017-08-19 18:38, Shark8 wrote:
> On Saturday, August 19, 2017 at 2:55:10 AM UTC-6, Dmitry A. Kazakov wrote:
>> On 2017-08-19 03:24, Shark8 wrote:
>>
>>> Moreover, thinking of directories in terms of strings leads to
>>> string manipulation for referring and it is *easy* to make errors there.
>>
>> Exactly, but the problem is the file type system. The file path type
>> must be a subtype of a universal string type in order to be able to write:
>>
>>      Open ("my_file.txt")
>>
> 
> But the file path should NOT be inherently a string, of any type, it
> should be a "directory-type"

File path type, not {absolute|relative} directory type.

> -- and any to/from string conversions (say
> from external sources) should be done properly -- that's the whole point
> I'm making: a directory is NOT a string, nor should we use strings
> [natively] to represent them.

File name encoded in a string is the normal use case most of the time. I 
agree that using strings makes it non-portable since string 
representations vary from OS to OS. Yet it is how things are.

>> instead of something like:
>>
>>      Open
>>      (  Current_Node +
>>         Current_Directory +
>>         To_File_Name ("my_file") +
>>         To_MIME_Type ("txt")
>>      )
> 
> Why would we need something like the above?

You need literal or aggregates or any other form to specify a value of 
the file path in Open. I used an expression.

BTW, it would be portable too.

> Besides, the Open function having the implicit parameter of Location
> defaulting to the "current location" would take care of half of that.

This works only with type conversions or massive overloading. Which was 
my point.

In order to have this mess typed, and you correctly said that it must 
be, you will need *separate* types for:

- Node / device
- Absolute directory
- Relative directory
- Simple name
- MIME type (extension)
- File version / change number (e.g. for VMS or source control systems)
- File name (simple name, MIME type, version number)
- Directory name (node, directory)
- File path (node, directory, name, MIME type, version number)

If Open were defined on file path, then a partial name would not match, 
unless converted implicitly, e.g. by adding directory name.

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

  reply	other threads:[~2017-08-19 17:09 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
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 [this message]
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