comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: [OT] interesting reason why a language is considered good
Date: Thu, 19 Apr 2012 07:22:58 -0700 (PDT)
Date: 2012-04-19T07:22:58-07:00	[thread overview]
Message-ID: <6492154.697.1334845378447.JavaMail.geo-discussion-forums@ynku11> (raw)
In-Reply-To: <jmnjsf$sro$1@munin.nbi.dk>

On Wednesday, April 18, 2012 6:48:28 PM UTC-5, Randy Brukardt wrote:
> <stefan-lucks@see-the.signature> wrote in message 
> news:Pine.LNX.4.64.1204180902020.24751@medsec1.medien.uni-weimar.de...
> ...
> > And I have yet so see some Ada code where
> > keywords are written in mixed case.
> 
> The original R.R.Software style wrote keywords in mixed case. We only 
> changed that style when Claw was built (I wanted Claw to have a more typical 
> style). Most of the Janus/Ada compiler and runtime code has the old style 
> (I've been changing the style when I've worked on particular subprograms, 
> but of course many subprograms haven't needed changes). That's about 300,000 
> lines of Ada in total.
> 
> So here's a piece of Janus/Ada code in the original style:
> 
>    Function Actual_Type(Old : In Type_Ptr) Return Type_Ptr Is
>    ----------------------------------------------------------------------
>    --  Returns Actual type for a type which was declared in a generic  --
>    --  unit specification.  (The actual type was the subtype           --
>    --  substituted in the template).  Returns Type_Ptr'First if this   --
>    --  isn't declared in a generic.  Only can be used outside the      --
>    --  Generic.                                                        --
>    ----------------------------------------------------------------------
>        Checking_Type : Type_Ptr := Old;
>        Temp_Rec : Type_Rec := 
> J2TypeTable.Get_From_Type_Table(Checking_Type);
>    Begin
>        Loop
>            If Temp_Rec.Typs = GENERIC_INST Then
>                Return Temp_Rec.Actual; -- Found it!
>            Elsif Temp_Rec.Parent_Type /= Type_Ptr'First Then
>                Checking_Type := Temp_Rec.Parent_Type;
>                Temp_Rec := J2TypeTable.Get_From_Type_Table(Checking_Type);
>            Else
>                Return Type_Ptr'First;
>            End If;
>        End Loop;
>    End Actual_Type;
> 
> Now, having seen that, you can never say again that you haven't seen "some 
> Ada code where keywords are written in mixed case." :-)
> 
>                                                Randy.

I rather like the style there.



  reply	other threads:[~2012-04-19 14:30 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15 10:27 [OT] interesting reason why a language is considered good Nasser M. Abbasi
2012-04-15 11:57 ` J-P. Rosen
2012-04-16 10:37   ` Peter C. Chapin
2012-04-15 12:27 ` Dmitry A. Kazakov
2012-04-17  6:59   ` tonyg
2012-04-17  7:43     ` Dmitry A. Kazakov
2012-04-15 14:05 ` Bill Findlay
2012-04-15 14:21 ` Pascal Obry
2012-04-15 14:54   ` Simon Wright
2012-04-15 15:34     ` Pascal Obry
2012-04-17  5:42       ` Brad Moore
2012-04-17 16:11         ` Simon Wright
2012-04-17 16:33           ` Robert A Duff
2012-04-17 19:34             ` Simon Wright
2012-04-17 21:42               ` Robert A Duff
2012-04-17 22:24                 ` Randy Brukardt
2012-04-18  7:00                   ` stefan-lucks
2012-04-17 21:17             ` Jeffrey Carter
2012-04-15 23:53     ` Brian Drummond
2012-04-16 10:43 ` Marius Amado-Alves
2012-04-16 11:48   ` Georg Bauhaus
2012-04-16 13:06     ` Dmitry A. Kazakov
2012-04-16 15:01       ` Georg Bauhaus
2012-04-16 15:31         ` Dmitry A. Kazakov
2012-04-16 17:11           ` Georg Bauhaus
2012-04-16 17:19             ` Georg Bauhaus
2012-04-16 18:00             ` Dmitry A. Kazakov
2012-04-16 21:48               ` Georg Bauhaus
2012-04-17  3:43                 ` Randy Brukardt
2012-04-17  4:43                   ` Bill Findlay
2012-04-17  7:46                   ` Georg Bauhaus
2012-04-17 22:32                     ` Randy Brukardt
2012-04-18  7:10                       ` stefan-lucks
2012-04-18 23:48                         ` Randy Brukardt
2012-04-19 14:22                           ` Shark8 [this message]
2012-04-17 15:48                   ` Simon Wright
2012-04-17 16:15                     ` Dmitry A. Kazakov
2012-04-17 19:33                       ` Simon Wright
2012-04-17  7:34                 ` Dmitry A. Kazakov
2012-04-17 16:01                   ` Simon Wright
2012-04-17 17:42                   ` Georg Bauhaus
2012-04-17 19:17                     ` Dmitry A. Kazakov
2012-04-17  3:24           ` Randy Brukardt
2012-04-17  3:33           ` Randy Brukardt
2012-04-16 19:55   ` sbelmont700
2012-04-17  0:48   ` Peter C. Chapin
2012-04-17 21:59 ` anon
2012-05-13  4:14   ` David Thompson
replies disabled

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