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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41b2c090403fab50 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-10 10:37:27 PST Message-ID: <3DA5B8E6.3010109@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Creating tempfile takes too long: GNAT or Windows bug? (& GtkAda) References: <4a4de33a.0210090358.fc50c13@posting.google.com> <3DA463E8.1080202@cogeco.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 10 Oct 2002 13:29:10 -0400 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1034270951 198.96.47.195 (Thu, 10 Oct 2002 13:29:11 EDT) NNTP-Posting-Date: Thu, 10 Oct 2002 13:29:11 EDT Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:29681 Date: 2002-10-10T13:29:10-04:00 List-Id: Preben Randhol wrote: > Marin David Condic wrote: > >>Probably because its quicker and easier to use OS calls with C because the >>OS is written in C. Dipping into an Ada binding to access C stuff always > > In Gnat.OS_Lib > > function File_Time_Stamp (Name : String) return OS_Time; > -- Given the name of a file, Name, obtains and returns the time stamp. > -- This function can be used for an unopend file. > > procedure Delete_File (Name : String; Success : out Boolean); > > :-) > >>feels like an unnatural act and invariably complicates the job. Just another >>data point indicating it would be useful to have an Ada OS and that the >>argument "Well, you can always bind to blah blah blah..." is seldom >>compelling. :-) > > Well if you drag the argument further you might end up with "why use Ada > at all?". > > Preben who thinks making hacks in Ada is just as fast or faster than C I had a feeling this sort of debate would break out if I confessed to using C for a "solution" ;-) Since the question was asked, I'll explain my reasons: - In my mind, this was a "nuisance assignment" - I wanted/needed a GUI front end - GtkAda is OK, but I find that it is still bit of a struggle to get things right there (some comments on this later) - I was in a hurry - I had MS Visual Studio available and used MFC for the GUI to get the job done. There is no doubt that if I wanted to do this "right", I would suffer through any barriers there might be for Ada (and there wasn't/isn't that much of a barrier really). But the bottom line was that I wanted to do other more fun things in Ada and this flippin temp file problem needed to be addressed ASAP. So to summarize: I was in a hurry, and MS VC was available, and MFC is/was easy for a simple input GUI form (it accepts multiple wildcard pathnames, and the # of days to retain files before deleting them). Now a point for discussion for GtkAda: I need to be careful here, because I don't want to criticize volunteer's efforts in this area. I would rather encourage them to continue with their efforts, since I think their goals are in line with most of ours in the Ada & GUI sense. However, I do have a few concerns about the implementation as it stands. Forgive me if I don't quite have the facts correct here, because it's been a while since I last worked with GtkAda... My main concern was with the implementation of certain aspects of GtkAda, concerning the use of typing. It seemed to me that there are too many places that require "data conversions" to occur in the application source code (I am thinking of parameters in certain callbacks where there was some sort of function to mangle things into the right type). It seems to me that there should be a better way to handle this correctly. Either through generics, or through the object'Class mechanism using inheritance. Converting from a base type to a derived type would be acceptable IMHO, although it does have the disadvantage that it is not properly checked until run time (generics OTOH would catch problems at compile time). IIRC, there was a certain amount of reliance on a GStrings package/interface too, which annoyed me (and other seemingly C like types). I would have preferred a native String interface rather than yet another strings package. The numeric types should not at least look like C types (maybe I'm just being picky about this one). Finally, it seems that every time I try to compile a recent version of GtkAda on FreeBSD, it has numerous compile and install issues. This puts me off, as it will any user that must go through this same process. As a result, I give up and say "try again in a few months". Are these fair comments? Or am I just getting cranky? -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg