comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Interpretation of extensions different from Unix/Linux?
Date: Sat, 5 Sep 2009 10:59:52 +0200
Date: 2009-09-05T10:59:50+02:00	[thread overview]
Message-ID: <15x3ulfmh0ci2.kiac3f37illy$.dlg@40tude.net> (raw)
In-Reply-To: h7sh9v$828$1@munin.nbi.dk

On Fri, 4 Sep 2009 21:08:49 -0500, Randy Brukardt wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
> news:10he0wbmken48$.1q24z0xzfg8ob.dlg@40tude.net...
>> On Thu, 3 Sep 2009 17:22:44 -0500, Randy Brukardt wrote:
>>
>>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
>>> news:17qw45cbpv4r.1rcmhhpnxv3dv.dlg@40tude.net...
>>> ...
>>>> This does not answer my question. Is file manager a typical application?
>>>> How can it be designed in Ada using Ada.Directories? Let us ignore GUI
>>>> issues.
>>>
>>> IMHO, no, it is not a typical application.
>>
>> Criterion?
> 
> Likelyhood of wanting to write it in Ada, of course. (Which ought to be 
> never, as I said below).

90% of any program that provides user interface dealing with files. You
cannot implement file open/save/list without it.

>>> You serve no one by reinventing
>>> the wheel, and file managers are an integral part of every modern OS, and
>>> commonly available on lots of non-modern OSes.
>>
>> So? Calculator program is available on all these OSes. Is it an argument
>> against Ada numeric types having operation "+"?
> 
> False analogy: "+" is useful for lots of things, not just writing a 
> calculator. You are talking about functionality that is *only* useful for 
> writing a file manager or equivalent. (And I'd argue that it isn't even 
> useful for that, but YMMV.)

The analogy is right. The functionality of any file being reachable is
essential to use a file system.

Programs dealing with one or two files  don't need Ada.Directories at all.
Similarly, if there are only two numbers, make them named constants and
forget about addition.

>>> Let the user use what they
>>> are familar with. If you did write one with Ada.Directories (and you 
>>> surely can, you just have to use some OS-specific way of finding roots), it 
>>> would necessarily be a poor imitation of the provided one
>>
>> Ada.Directories *is* a poor imitation of OS-specific file search. Why is 
>> it in the standard? You cannot apply this logic while keeping 
>> Ada.Directories.
> 
> I totally disagree. You can write quite useful programs using 
> Ada.Directories without depending on anything OS-specific beyond whether or 
> not the package is supported at all.

This is just untrue. I already have pointed out that Ada.Directories cannot
be used without OS-specific programming. You cannot get file names without
using string literals which *are* OS-specific. In fact not a single
operation there can be used without OS-specific programming around it,
unless the file name is entered from the keyboard and then used as-is,
which Ada.Text_IO already does. If you put file name into a string literal,
that is OS-specific. To let the user choose files from a list is
OS-specific/impossible. To filter files by names is OS-specific. To compare
files for identity is OS-specific. To compare file names is OS-specific.

> (One obvious 
> example: we couldn't come up with a portable way to define a package that 
> could start other programs. Every compiler has this functionality, but it 
> isn't amenable to describing in Standards terms.)

No problem with that, except the false conception, that such a package
(Ada.Directories is among such) should reflect properties of the underlying
OS. All Ada DB bindings suffer this same illness, which limits their
usefulness but multiplies the count of. This is trivially wrong. You cannot
be OS-specific and portable.

Instead of that, Ada packages should provide an abstraction layer, a model
OS, independent on the target. Note that all modern GUI and other
middleware libraries follow this path. No problem, you can spawn a process
using Glib in an OS-independent way. It would be perfectly possible to
introduce Ada library for spawning processes with three pipes (represented
by Ada streams). I wrote a similar thing for GtkAda based on the Glib
functionality.

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



  reply	other threads:[~2009-09-05  8:59 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-01 17:53 Interpretation of extensions different from Unix/Linux? vlc
2009-08-02 17:13 ` Jacob Sparre Andersen
2009-08-04 11:31   ` vlc
2009-08-04 11:44     ` Jacob Sparre Andersen
2009-08-04 11:57       ` Georg Bauhaus
2009-08-04 12:29         ` vlc
2009-08-04 13:43         ` Dmitry A. Kazakov
2009-08-14  4:33           ` Randy Brukardt
2009-08-14  7:37             ` Dmitry A. Kazakov
2009-08-04 12:25       ` vlc
2009-08-04 19:18         ` Jeffrey R. Carter
2009-08-04 19:52           ` Dmitry A. Kazakov
2009-08-04 20:45             ` Jeffrey R. Carter
2009-08-04 21:22               ` Dmitry A. Kazakov
2009-08-04 22:04                 ` Jeffrey R. Carter
2009-08-05  8:33                   ` Dmitry A. Kazakov
2009-08-05 16:07                     ` Jeffrey R. Carter
2009-08-05 16:35                       ` Dmitry A. Kazakov
2009-08-05 17:49                         ` Jeffrey R. Carter
2009-08-05 18:16                           ` Dmitry A. Kazakov
2009-08-05 19:27                             ` Jeffrey R. Carter
2009-08-05 19:50                               ` Dmitry A. Kazakov
2009-08-05 20:46                                 ` Jeffrey R. Carter
2009-08-06  7:43                                   ` Dmitry A. Kazakov
2009-08-05 21:33                               ` Robert A Duff
2009-08-05 19:45                           ` vlc
2009-08-05 19:56                             ` Dmitry A. Kazakov
2009-08-14  4:56                     ` Randy Brukardt
2009-08-14  8:01                       ` Dmitry A. Kazakov
2009-08-14 23:02                         ` Adam Beneschan
2009-08-14 23:54                         ` Randy Brukardt
2009-08-15  8:10                           ` Dmitry A. Kazakov
2009-08-15 12:49                             ` Pascal Obry
2009-08-15 13:23                               ` Dmitry A. Kazakov
2009-08-15 15:11                                 ` Pascal Obry
2009-08-15 17:11                                   ` Dmitry A. Kazakov
2009-08-15 20:07                                     ` Pascal Obry
2009-08-16  7:26                                       ` Dmitry A. Kazakov
2009-08-17 22:28                             ` Randy Brukardt
2009-08-18  0:32                               ` Adam Beneschan
2009-08-18 20:48                                 ` Randy Brukardt
2009-08-19  4:08                                   ` stefan-lucks
2009-08-19 22:01                                     ` Randy Brukardt
2009-08-19  7:37                                   ` Jean-Pierre Rosen
2009-08-19 16:10                                   ` Adam Beneschan
2009-08-19 22:11                                     ` Randy Brukardt
2009-08-18  7:48                               ` Dmitry A. Kazakov
2009-08-18 20:37                                 ` Randy Brukardt
2009-08-19  8:04                                   ` Dmitry A. Kazakov
2009-08-19 10:32                                     ` Georg Bauhaus
2009-08-19 12:11                                       ` Dmitry A. Kazakov
2009-08-19 15:21                                         ` Georg Bauhaus
2009-08-19 22:40                                     ` Randy Brukardt
2009-08-20  8:00                                       ` Variable- and fixed-length-character strings (Was: Interpretation of extensions different from Unix/Linux?) Jacob Sparre Andersen
2009-08-20 19:40                                       ` Interpretation of extensions different from Unix/Linux? Dmitry A. Kazakov
2009-08-21  0:08                                         ` Randy Brukardt
2009-08-21  7:43                                           ` Dmitry A. Kazakov
2009-08-21 22:10                                             ` Randy Brukardt
2009-08-22  7:27                                               ` Dmitry A. Kazakov
2009-09-01  1:50                                                 ` Randy Brukardt
2009-09-01  7:28                                                   ` Dmitry A. Kazakov
2009-09-02  3:41                                                     ` Stephen Leake
2009-09-02  7:17                                                       ` Dmitry A. Kazakov
2009-09-02 19:49                                                         ` tmoran
2009-09-03  7:41                                                           ` Dmitry A. Kazakov
2009-09-03 17:27                                                             ` tmoran
2009-09-03 20:44                                                               ` Dmitry A. Kazakov
2009-09-03 22:22                                                                 ` Randy Brukardt
2009-09-04  7:40                                                                   ` Dmitry A. Kazakov
2009-09-05  1:58                                                                     ` Randy Brukardt
2009-09-05  2:08                                                                     ` Randy Brukardt
2009-09-05  8:59                                                                       ` Dmitry A. Kazakov [this message]
2009-08-21 10:11                                           ` Enumeration of network shared under Windows (was: Interpretation of extensions different from Unix/Linux?) Dmitry A. Kazakov
2009-08-15 16:01                           ` Interpretation of extensions different from Unix/Linux? Vadim Godunko
2009-08-16 13:13                           ` Stephen Leake
2009-08-14  4:46                 ` Randy Brukardt
2009-08-14  9:00                   ` Dmitry A. Kazakov
2009-08-04 21:19           ` vlc
2009-08-14  5:19     ` Randy Brukardt
2009-08-14  6:13       ` Wilcards in Linux (was: Interpretation of extensions different from Unix/Linux?) stefan-lucks
2009-08-14  6:24         ` stefan-lucks
2009-08-14 10:05         ` Wilcards in Linux Markus Schoepflin
2009-08-14 10:22           ` Ludovic Brenta
2009-08-14 18:20             ` Tero Koskinen
2009-08-19 20:39       ` Interpretation of extensions different from Unix/Linux? Keith Thompson
2009-08-19 22:09         ` Robert A Duff
2009-08-20  7:49           ` Jacob Sparre Andersen
2009-08-20 15:56             ` Adam Beneschan
2009-08-20 21:58               ` sjw
2009-08-20 19:44             ` Robert A Duff
2009-08-20 21:34               ` Adam Beneschan
2009-08-20 22:03                 ` (see below)
2009-08-21  0:55                 ` tmoran
2009-08-20 23:55               ` Randy Brukardt
2009-08-21 17:58               ` Keith Thompson
2009-08-21 18:34                 ` Dmitry A. Kazakov
2009-08-21 19:32                 ` Jeffrey R. Carter
2009-08-21 21:34                 ` Robert A Duff
2009-08-21 22:06                   ` Hyman Rosen
2009-08-24 19:51                   ` Keith Thompson
2009-08-28  0:27                     ` Robert A Duff
2009-08-28 13:15                       ` Anders Wirzenius
2009-08-28 15:02                         ` Robert A Duff
2009-08-21  8:45             ` Stephen Leake
replies disabled

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