From: Jonan Scheffler Date: 2012-05-27T22:27:49+09:00 Subject: Re: Am I justified to use a global variable if it must be used in all scopes? --f46d0438931b13350504c104915f Content-Type: text/plain; charset=ISO-8859-1 Name the class whatever you like. I think 'Jonan' would be an excellent name, but you might choose a name that more accurately describes its purpose. Perhaps something like Runner? That's pretty general. This allows you to have other logic around the current heap if you want it, and it gives you a convenient place for other information that must be shared by your entire application. On May 27, 2012 9:15 AM, "Phil Stone" wrote: > > Perhaps a singleton class? > A Singleton class of what kind of object? > > > It seems to me that you're probably in need > > of > > some more abstraction if you feel you need a global variable. > But this one variable is what the program is based on. To be more > specific, it is an instance of my Heap class, which is edited by > Variable instances and others. I'm not sure how I could abstract that. > > -- > Posted via http://www.ruby-forum.com/. > > --f46d0438931b13350504c104915f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Name the class whatever you like. I think 'Jonan' would be an ex= cellent name, but you might choose a name that more accurately describes it= s purpose.

Perhaps something like Runner?
That's pretty general.

This allows you to have other logic around the current heap if you want = it, and it gives you a convenient place for other information that must be = shared by your entire application.

On May 27, 2012 9:15 AM, "Phil Stone" = <lists@ruby-forum.com> wr= ote:
> Perhaps a singleton class?
A Singleton class of what kind of object?

> It seems to me that you're probably in need
> of
> some more abstraction if you feel you need a global variable.
But this one variable is what the program is based on. To be more
specific, it is an instance of my Heap class, which is edited by
Variable instances and others. I'm not sure how I could abstract that.<= br>
--
Posted via http://= www.ruby-forum.com/.

--f46d0438931b13350504c104915f--