comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Operating System differences and Ada OS independent programming
Date: Thu, 24 Mar 2016 08:58:01 +0100
Date: 2016-03-24T08:58:01+01:00	[thread overview]
Message-ID: <nd06n1$18a1$1@gioia.aioe.org> (raw)
In-Reply-To: 47928e41-a04b-46fb-a5cc-3a3451e0246e@googlegroups.com

On 2016-03-24 04:36, Shark8 wrote:
> On Wednesday, March 23, 2016 at 2:39:08 AM UTC-6, Dmitry A. Kazakov wrote:
>>
>> Ada's abstraction should reflect the most generic file system properties:
>>
>> - Acyclic directed graph of names built from Unicode code points;
>
> No, these should be a private type which is 0..Unsigned_32/64 and
> has  the name as a property whose value is a unicode string. There should be
> a "translate" function which takes a Unicode string and translates it
> into the filesystem-actual's encoding. -- an identical yet distinct type
> should exist for directories.

Ada does not have Unicode strings. The point is that graph nodes 
(filenames) are logically chains of code points.

>> - Multiple roots (AKA devices);
>
> No, absolutely not.

Why? Only one OS (Unix) has single root, which does not work anyway in 
presence of networking, virtual, portable file systems. In its GUI, e.g. 
GNOME Linux dropped single root concept.

>> - Current directory path generator;
>
> Pretty much unneeded if there's a directory-type:
> Type FS_Rider is
>    Current : Directory_Type;
>    -- Other state information.
> end record;

You need functions returning standard paths. E.g. (imaginary operations)

    Get_Current_Directory / "My_Folder" / "Hello_World" + "ads"

instead of

    "./My_Folder/Hello_World.ads"

>> - Extension / MIME types;
>
> Why?

Files have extensions, don't they?

>> - Version / change / release number;
>
> Definitely.
>
>> - Time stamps (modification, creation etc).
>
> Which should be Ada.Calendar.Time.

Yes, but you need operations putting them into the path.

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


  reply	other threads:[~2016-03-24  7:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 13:18 Operating System differences and Ada OS independent programming ldries46
2016-03-21 15:07 ` gautier_niouzes
2016-03-21 17:24 ` Dennis Lee Bieber
2016-03-21 22:04   ` Randy Brukardt
2016-03-22  8:43     ` Dmitry A. Kazakov
2016-03-22 11:15       ` G.B.
2016-03-22 13:40         ` Dmitry A. Kazakov
2016-03-22 14:36           ` Stefan.Lucks
2016-03-22 15:08           ` G.B.
2016-03-22 19:06             ` Dmitry A. Kazakov
2016-03-23  8:13         ` gautier_niouzes
2016-03-23  8:38           ` Dmitry A. Kazakov
2016-03-23 15:08             ` G.B.
2016-03-24  8:00               ` Dmitry A. Kazakov
2016-03-24 10:41                 ` G.B.
2016-03-24 10:42                   ` G.B.
2016-03-24 12:16                   ` Dmitry A. Kazakov
2016-03-24  3:36             ` Shark8
2016-03-24  7:58               ` Dmitry A. Kazakov [this message]
2016-03-24 11:42                 ` Dennis Lee Bieber
2016-03-24  1:19 ` rieachus
replies disabled

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