From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx25.iad.POSTED!not-for-mail From: Hubert User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What is your opinion on Global Objects? References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 141117-1, 11/17/2014), Outbound message X-Antivirus-Status: Clean Message-ID: X-Complaints-To: abuse@newsdemon.com NNTP-Posting-Date: Tue, 18 Nov 2014 03:07:59 UTC Organization: http://www.NewsDemon.com Date: Mon, 17 Nov 2014 19:08:03 -0800 X-Received-Bytes: 1674 X-Received-Body-CRC: 2937087549 Xref: news.eternal-september.org comp.lang.ada:23502 Date: 2014-11-17T19:08:03-08:00 List-Id: > This is only a problem in poorly designed languages. In Ada these "singletons" > should be packages. No global variables needed. No access types needed, much > less global access variables. > Perhaps I didn't make myself clear enough. I am talking about something like class A { void function1(); ...... } A s_object_a; and then other code being able to access the object like s_object.a.function1(); I guess in Ada you could have a package with a type and a variable in the body but you would still need a way to access that variable somehow in other packages, either through a parameter or globally and that's my question. What is the best way to access such an object --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com