comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Why no named case statements?
Date: Sun, 06 Sep 2009 08:44:46 -0400
Date: 2009-09-06T08:44:46-04:00	[thread overview]
Message-ID: <wccfxb0cke9.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1doe3xrcrqyeh.101b6gamg91bj.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> Ada has labels:
>
> <<Decide_This>>
>    case Some_Variable is
>        ...
>    end case;
>
> <<Decide_That>>
>    if Whatever then
>       ...
>    end if:

I prefer comments:

   -- Decide this.
   case Some_Variable is
       ...
   end case;

   -- Decide that.
   if Whatever then
      ...
   end if:

To me, a label is a warning that gotos are lurking around the place.

- Bob



  reply	other threads:[~2009-09-06 12:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 23:06 Why no named case statements? Britt Snodgrass
2009-09-04 23:47 ` Adam Beneschan
2009-09-05  0:29 ` Robert A Duff
2009-09-05  0:49   ` Adam Beneschan
2009-09-05  1:04     ` Robert A Duff
2009-09-05  8:18 ` Dmitry A. Kazakov
2009-09-06 12:44   ` Robert A Duff [this message]
2009-09-06 17:46     ` Britt
2009-09-07  7:27       ` Ole-Hjalmar Kristensen
replies disabled

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