comp.lang.ada
 help / color / mirror / Atom feed
From: Matt Borchers <mattborchers@gmail.com>
Subject: Re: potential Ada feature - comments?
Date: Thu, 12 Sep 2019 18:14:11 -0700 (PDT)
Date: 2019-09-12T18:14:11-07:00	[thread overview]
Message-ID: <067d5a1d-a17d-46d1-8627-e904099d0621@googlegroups.com> (raw)
In-Reply-To: <qla985$2vb$1@gioia.aioe.org>

I am not a proponent of OOP in general but I do think that some of the principles of it can lead to better software.

I like the idea of defining how resources should be returned at the point where they are acquired, but that does not define WHEN that should happen unless it is assumed that "going out of scope" is always the proper time.  Ada is still a procedural language such that, outside of using Controlled types, one can read the lines of a sub-program and know the exact order of what is going to be executed.

My "inconvenience" is that there is no place in the syntax to execute code after the sub-program's main exception handler except to create a unfortunate anonymous block only to provide that space following it.  Returning resources is only one example of a use-case for this syntax.  I think there are other reasons this would be helpful.


  reply	other threads:[~2019-09-13  1:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 17:52 potential Ada feature - comments? Matt Borchers
2019-09-10 19:13 ` Dmitry A. Kazakov
2019-09-11  0:35   ` Matt Borchers
2019-09-11  7:54     ` Dmitry A. Kazakov
2019-09-13  1:14       ` Matt Borchers [this message]
2019-09-11 16:00     ` G. B.
2019-09-11  9:55 ` fabien.chouteau
replies disabled

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