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-10 02:46:06 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!newsfeed.stueberl.de!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Reprise: 'in out' parameters for functions Date: Sat, 10 Apr 2004 09:46:05 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <5ad0dd8a.0404090512.15af2908@posting.google.com> <5ad0dd8a.0404091828.6e79bb4e@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1081590365 26622 134.91.1.34 (10 Apr 2004 09:46:05 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Sat, 10 Apr 2004 09:46:05 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:6939 Date: 2004-04-10T09:46:05+00:00 List-Id: Wojtek Narczynski wrote: : Hello, : :> I take it Ada forces abstraction in version in cases? :> Could you name an example unit to look at? : : 'Inversion' not 'in version' incase it were more than a typo. A typo, sorry. : When you : implement a semaphore over a protected object, or in general when you : need to lock / unlock by yourself. Classic example: : : polyorb-tasking-profiles-full_tasking-mutexes.adb Thanks. Given that mutex and semaphores have been known when Ada was made, I wonder whether there aren't some external forces at work which lead to the requirement of using tasking constructs below language level. Not Ada's fault from this perspective. Incidentally, there is some abstraction inversion criticism quoting Ada, mutex, and tasks. But has not been brought up to date where date refers to 1995. So there is another meaning of "classic". : function in_kilograms (x: Quantity) return Units.yard; : -- Blows at runtime I don't think so. How do you write an expression expecting Unis.kilogram, where the compiler sees a function returning Units.yard, such that the compiler does not reject? : This just cannot be done right in Ada. :> What's missing? : : From the language? For example parameters for exceptions. Not a good idea I think, though practical for use in quick and dirty fixes of design errors. Programm logic can be programmed.