From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: Context syntax proposals, using "with", withing "use" etc.
Date: 23 Dec 2003 04:02:36 -0500
Date: 2003-12-23T04:02:36-05:00 [thread overview]
Message-ID: <mailman.168.1072170168.31149.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <PnfFuv_SxF@VB1162.spb.edu>
"Alexandre E. Kopilovitch" <aek@VB1162.spb.edu> writes:
> Second, there is still a displeasure here, which can even become a
> hindrance in some circumsrances: when there are many context clauses
> for a package, they just occupy too big part of the text; and
> because those context clauses are necessarily at the beginning of
> each package, they intersperse and clutter the whole program, which
> makes reading more difficult (even if each package has its own
> window) - if one tried not to study thoroughly, but just to read and
> catch the general method\logic\approach of the program.
Hmm. I'd say this is also a text editor problem; the editor should
provide an easy way to put the cursor on the "package" keyword,
skipping the context clause. My Emacs Ada-mode does that. That's one
advantage of Ada over C; there is a clear end to the context clause.
> Therefore I think that explicit separatation of the whole context from the
> package's specs as well as from the package's body would be much more
> consistent and useful step (than all possible manipulation with "with" and
> "use" only) for the purpose. I mean something like that:
>
> package MyDream context is
> -- or package context MyDream is - if you like it better
> with ...;
> with ...; use ...;
> ...
> end MyDream;
>
> package MyDream is
> ...
> end MyDream;
>
> package body MyDream context is
> with ...;
> with ...; use ...;
> ...
> end MyDream;
>
> package body MyDream is
> ...
> end MyDream;
I don't see how this reduces clutter, or total size. The text editor
still needs to be able to skip the context clause.
--
-- Stephe
next parent reply other threads:[~2003-12-23 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <PnfFuv_SxF@VB1162.spb.edu>
2003-12-23 9:02 ` Stephen Leake [this message]
2003-12-22 23:53 Context syntax proposals, using "with", withing "use" etc Alexandre E. Kopilovitch
2003-12-23 10:37 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox