Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualSuperVGA

Posted 27 June 2013 - 01:12 AM

Well, that settles it, i guess...

 

@Trienco, if I absolutely had to do that, I think I'd have made another wrong turn somewhere. I love my project, but not so much that I'm blinded by it,

and I sure will learn from mistakes such as this one. The thing that really scares me though, is if I've unknowingly been practicing something that I thought was good,
but ended up revealing itself as evil much further in the development. I think I'll put the maps elsewhere...

@AllEightUp; thanks for your explanation and your suggestion to move my class below the declaration. But that somehow seems like a hackish way to circumvent the issue.

 

I do realize that static is evil, but due to how I have been taught, to declare objects and use initialization lists vigorously in constructors, everything seems to be created before i hit main(), and now I see that this is is also a very risky approach (everything is created at once, and it's difficult to control the application-wide order of initialization.)

 

The maps are something I'm using for addressing the various elements. Each has a unique name and a id unique to the subsystem. I thought it would be nice to make these maps static - the surrounding classes basically only need to read from them. This I will change. I suppose a factory, or my "SceneController" could take care of this.

The ::parse() functions I think, are a OK to keep static within their respective classes.

 

I should also try to stay away from declaring anything in otherwise global namespaces, as they will be in this pool of objects created before main().

Thanks for all your help. If you have some more input with regards to design, don't hesitate to continue a discussion! I 

Good thing I don't have that many units of code now - I can't help imagining my reaction if I had 1000 other classes.
Luckily I only had a few, - but I thought I played safe yet I never saw this coming.


#2SuperVGA

Posted 27 June 2013 - 12:30 AM

Well, that settles it, i guess...

@Trienco, if I absolutely had to do that, I think I'd have made another wrong turn somewhere. I love my project, but not so much that I'm blinded by it,

and I sure will learn from mistakes such as this one. The thing that really scares me though, is if I've unknowingly been practicing something that I thought was good,
but ended up revealing itself as evil much further in the development. I think I'll put the maps elsewhere...

@AllEightUp; thanks for your explanation and your suggestion to move my class below the declaration. But that somehow seems like a hackish way to circumvent the issue.

 

I do realize that static is evil, but due to how I have been taught, to declare objects and use initialization lists vigorously in constructors, everything seems to be created before i hit main(), and now I see that this is is also a very risky approach (everything is created at once, and it's difficult to control the application-wide order of initialization.)

 

The maps are something I'm using for addressing the various elements. Each has a unique name and a id unique to the subsystem. I thought it would be nice to make these maps static - the surrounding classes basically only need to read from them. This I will change. I suppose a factory, or my "SceneController" could take care of this.

The ::parse() functions I think, are a OK to keep static within their respective classes.

 

I should also try to stay away from declaring anything in otherwise global namespaces, as they will be in this pool of objects created before main().

Thanks for all your help. If you have some more input with regards to design, don't hesitate to continue a discussion! I 

Good thing I don't have that many units of code now - I can't help imagining my reaction if I had 1000 other classes.
Luckily I only had a few, - but I thought I played safe yet I never saw this coming.


#1SuperVGA

Posted 27 June 2013 - 12:26 AM

Well, that settles it, i guess...

@AllEightUp; thanks for your explanation and your suggestion to move my class below the declaration. But that somehow seems like a hackish way to circumvent the issue.

 

I do realize that static is evil, but due to how I have been taught, to declare objects and use initialization lists vigorously in constructors, everything seems to be created before i hit main(), and now I see that this is is also a very risky approach (everything is created at once, and it's difficult to control the application-wide order of initialization.)

 

The maps are something I'm using for addressing the various elements. Each has a unique name and a id unique to the subsystem. I thought it would be nice to make these maps static - the surrounding classes basically only need to read from them. This I will change. I suppose a factory, or my "SceneController" could take care of this.

The ::parse() functions I think, are a OK to keep static within their respective classes.

 

I should also try to stay away from declaring anything in otherwise global namespaces, as they will be in this pool of objects created before main().

Thanks for all your help. If you have some more input with regards to design, don't hesitate to continue a discussion! I 

Good thing I don't have that many units of code now - I can't help imagining my reaction if I had 1000 other classes.
Luckily I only had a few, - but I thought I played safe yet I never saw this coming.


PARTNERS