comp.lang.ada
 help / color / mirror / Atom feed
From: Hubert <herrdoktor@fumanchu.com>
Subject: Re: What is your opinion on Global Objects?
Date: Tue, 18 Nov 2014 18:50:27 -0800
Date: 2014-11-18T18:50:27-08:00	[thread overview]
Message-ID: <OzTaw.281638$lO7.189293@fx26.iad> (raw)
In-Reply-To: <m4fa86$ccf$1@dont-email.me>

On 11/18/2014 3:23 AM, Brian Drummond wrote:
> On Mon, 17 Nov 2014 19:08:03 -0800, Hubert wrote:
>
>>> This is only a problem in poorly designed languages. In Ada these
>>> "singletons"
>>> should be packages.
>
>>   What is the best way to access such an object
>
> Through the accessor subprograms supplied by the package.
>
> - Brian
>
That basically is a vote for global objects. Whether they are accessed 
through a global variable or some sort of getter function that returns 
access, it means bypassing the parameters. Well from what I read here, 
there are no strong opinions for either concept. Strange, I wasn't able 
to find good arguments for or against the two concepts anywhere, I guess 
they are just used interchangeably in applications.

Personally I am for global objects since they keep the interfaces 
smaller and avoid tramp data, the problem I see is just the unit test 
setup. Subprograms with side effect are hard to test automatically


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

  reply	other threads:[~2014-11-19  2:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  1:36 What is your opinion on Global Objects? Hubert
2014-11-18  2:52 ` Jeffrey Carter
2014-11-18  3:08   ` Hubert
2014-11-18  3:16     ` Shark8
2014-11-18  5:09     ` Jeffrey Carter
2014-11-18 11:23     ` Brian Drummond
2014-11-19  2:50       ` Hubert [this message]
2014-11-19  3:03         ` Jeffrey Carter
2014-11-19  9:13           ` Hubert
2014-11-19 10:22             ` J-P. Rosen
2014-11-19 17:37             ` Jeffrey Carter
2014-11-20 16:34         ` Stephen Leake
2014-11-20 21:11           ` Adam Beneschan
2014-11-21 15:25             ` Stephen Leake
2014-11-21 21:53             ` Randy Brukardt
2014-11-21  1:25           ` Hubert
2014-11-21  3:00           ` Brad Moore
2014-11-19 10:11   ` Jacob Sparre Andersen
2014-11-20  6:21     ` Hubert
2014-11-18  8:54 ` Dmitry A. Kazakov
2014-11-20 20:33 ` sbelmont700
2014-11-20 21:35   ` J-P. Rosen
2014-11-21  1:02     ` sbelmont700
2014-11-21  1:31       ` Hubert
2014-11-21  9:01     ` Dmitry A. Kazakov
2014-11-22  7:46       ` J-P. Rosen
2014-11-22  9:02         ` Dmitry A. Kazakov
replies disabled

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