comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <ZUERCHER_Andreas@outlook.com>
Subject: Re: Ada++
Date: Fri, 29 May 2020 14:57:14 -0700 (PDT)
Date: 2020-05-29T14:57:14-07:00	[thread overview]
Message-ID: <85d07cd3-8f7b-4e19-81a9-397b53166b3d@googlegroups.com> (raw)
In-Reply-To: <raqqgu$nss$1@dont-email.me>

On Friday, May 29, 2020 at 6:09:20 AM UTC-5, björn lundin wrote:
> Den 2020-05-29 kl. 04:57, skrev Rick Newbie:
> > The curly braces are definitely not a problem
> 
> If you ever lost one in the middle, you know that they ARE a problem
> 
> end if/end case /end proc-name /end func.name /end package name /end 
> loop etc
> makes it much easier too see where somehing ends
> 
> switch (a)
> {
>     case 1 :
>      {
>        if (B==C)
>        {
>           while (true)
>           {
>             doSometing1();
>             done = doSometing2();
>             if done break;
>           }
>        }
>     }
> }
> 
> compared to
> 
> case a is
>    when 1 =>
>      if B = C then
>        loop
>           Do_Someting1;
>           Done := Do_Someting2;
>           exit when Done;
>        end loop;
>      end if;
>    when others => null;
> end case;
> 
> 
> -- 
> Björn

Well, to be fair, C and its progeny have botched the original BCPL block-statement bracketing hints.

https://dl.acm.org/doi/pdf/10.1145/988131.988138

As depicted in the article above, the BCPL feature applied to C would be the following, including compile-time enforcement to assure that the programmer-chosen bra tags match the programmer-chosen ket tags (where bra-ket is slang for open bracket and close bracket).

switch (a)
{sa
    case 1 :
     {c1
       if (B==C)
       {ifBC
          while (true)
          {wT
            doSometing1();
            done = doSometing2();
            if done break;
          }wT
       }ifBC
    }c1
}sa

As also mentioned in the above-linked article, PL/I had an analogous label-based mechanism for
LBL: block-statement here END LBL;
which, btw, Green-Ada partially borrowed due its limited amount of competitiveness with Red-PL/I.

  parent reply	other threads:[~2020-05-29 21:57 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 22:33 Ada++ Jerry
2020-05-29  2:09 ` Ada++ Nasser M. Abbasi
2020-05-29  2:57   ` Ada++ Rick Newbie
2020-05-29  9:49     ` Ada++ raph.amiard
2020-05-29  9:51     ` Ada++ gautier_niouzes
2020-05-30  1:32       ` Ada++ Rick Newbie
2020-05-30  6:52         ` Ada++ gautier_niouzes
2020-05-30  7:04           ` Ada++ Rick Newbie
2020-05-30  7:31           ` Ada++ Dmitry A. Kazakov
     [not found]           ` <rb05fk$l5r$1@dont-email.me>
2020-05-31 21:20             ` Ada++ gautier_niouzes
2020-05-29 10:36     ` Ada++ Luke A. Guest
2020-05-30  1:35       ` Ada++ Rick Newbie
2020-05-29 11:09     ` Ada++ Björn Lundin
2020-05-29 12:31       ` Ada++ Nasser M. Abbasi
2020-05-29 21:57       ` Optikos [this message]
2020-05-31 11:40         ` Ada++ Björn Lundin
2020-05-31 15:51           ` Ada++ J-P. Rosen
2020-05-30  1:36       ` Ada++ Rick Newbie
2020-05-29  3:45 ` Ada++ Optikos
2020-05-29 15:41   ` Ada++ Optikos
2020-05-29  3:54 ` Ada++ cantanima.perry
2020-05-29 10:41   ` Ada++ Luke A. Guest
2020-05-29  4:17 ` Ada++ Wesley Pan
2020-05-29  4:38   ` Ada++ Nasser M. Abbasi
2020-05-29  6:06     ` Ada++ J-P. Rosen
2020-05-29  6:56       ` Ada++ Dmitry A. Kazakov
2020-05-29  7:22         ` Ada++ J-P. Rosen
2020-05-29  9:23       ` Ada++ fabien.chouteau
2020-05-29  9:43         ` Ada++ raph.amiard
2020-05-29 10:27           ` Ada++ Jeffrey R. Carter
2020-05-29 11:00             ` Ada++ Dmitry A. Kazakov
2020-05-29 20:57           ` Ada++ J-P. Rosen
2020-06-13  9:40       ` Ada++ Nasser M. Abbasi
2020-06-13 10:03         ` Ada++ gautier_niouzes
2020-06-13 10:11           ` Ada++ Nasser M. Abbasi
2020-06-13 10:07         ` Ada++ Dmitry A. Kazakov
2020-06-14  5:29         ` Ada++ J-P. Rosen
2020-05-30 15:25 ` Ada++ ric.wai88
2020-05-30 17:02   ` Ada++ Stéphane Rivière
2020-05-30 20:56   ` Ada++ Optikos
2020-05-30 21:58     ` Ada++ ric.wai88
2020-06-05 22:37       ` Ada++ Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2004-10-22 13:22 Ada# fabio de francesco
2004-10-22 13:36 ` Ada# Marc A. Criley
     [not found] <200203220829.JAA11725@bulgaria.otn.eurocopter.de>
2002-03-22 15:55 ` Ada? sk
2002-03-22  8:29 Ada? Christoph Grein
2002-03-22 14:57 ` Ada? Ted Dennison
2002-03-22 15:34   ` Ada? Jean-Pierre Rosen
     [not found] <200203220654.HAA11171@bulgaria.otn.eurocopter.de>
2002-03-22  7:58 ` Ada? sk
     [not found] ` <3C9AE426.471865A1@myob.com>
2002-03-22  8:05   ` Ada? sk
2002-03-22  6:54 Ada? Christoph Grein
2002-02-19 21:21 Ada? anymous
2002-02-19 22:02 ` Ada? chris.danx
2002-02-19 23:38 ` Ada? Larry Kilgallen
2002-02-24  3:23 ` Ada? Nick Roberts
2002-02-24 15:09   ` Ada? Georg Bauhaus
2002-02-27 15:26   ` Ada? Enrico A.
2002-03-19 15:06     ` Ada? Colin Paul Gloster
2002-03-19 20:57       ` Ada? Ted Dennison
2002-03-19 22:00         ` Ada? Dan Andreatta
2002-03-19 23:45           ` Ada? Larry Kilgallen
2002-03-20 14:26           ` Ada? Ted Dennison
     [not found]             ` <3C98E9CC.45D733F2@west.raytheon.com>
2002-03-21  9:39               ` Ada? Preben Randhol
2002-03-20  2:08         ` Ada? Adrian Hoe
2002-03-20 17:39           ` Ada? Marin David Condic
2002-03-22  1:56             ` Ada? Adrian Hoe
2002-03-22  2:34               ` Ada? Richard Riehle
2002-03-20  1:41     ` Ada? Adrian Hoe
2002-03-20  2:34       ` Ada? DPH
2002-03-20 10:52       ` Ada? Reinert Korsnes
2002-03-20 13:32       ` Ada? Gary Scott
2002-02-27 21:37 ` Ada? Ken Pinard
replies disabled

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