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,9d303864ae4c70ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-15 17:29:19 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Reprise: 'in out' parameters for functions Date: 15 Apr 2004 17:29:19 -0700 Organization: http://groups.google.com Message-ID: <5ad0dd8a.0404151629.5e270f63@posting.google.com> References: <5ad0dd8a.0404100735.7b2a8317@posting.google.com> <5ad0dd8a.0404130130.66d5e721@posting.google.com> <5ad0dd8a.0404131441.20b8a942@posting.google.com> <5ad0dd8a.0404140703.49e1e2f2@posting.google.com> NNTP-Posting-Host: 83.27.43.192 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1082075359 31501 127.0.0.1 (16 Apr 2004 00:29:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Apr 2004 00:29:19 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:7180 Date: 2004-04-15T17:29:19-07:00 List-Id: Hello, > Sorry, but I still do not get your point. Either Ada features are 1) beyond > any help; 2) OK, but has to be impoved in some definite way; 3) Excellent. > It seems that you do not agree with (3). So either (1) or (2) remain. Which > one? Depends on the application. For highly concurrent data structures that would be 1, for tutorials 3. For many applications they are probably okay. I am talking about concurrency features only now, but other parts of the language also have their problems. Still, with all the problems, Ada is overall the best procedural language I've seen. --- > I gave you an example of a *real* application requiring units (and units > checks, because surely in any place where the system expects, say, a > velocity, the operator may give it in any compatible unit: knot, km/h, m/s, > mph, whatsoever, but not in kPa. So units are indeed checked.) You could make it unable to enter a wrong unit in the interface. So this would be ensuring that 'Unit_Error' cannot be raised, rather than catching and handling it. But it is not always possible, for example when reading from an untrusted file, so you are right. > I already mentioned in my previous post that Ada designers managed to do a > similar job with the type String. Carefully observe how Ada deals with > statically constrained String subtypes. In my view it is quite possible to > deal this way with dimensioned values too. I've studied your code on units, I admit I should have done that before engaging in discussion about units with you. Regards, Wojtek