Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 09 November 2012 - 11:20 PM

If you take Khatharr's statement, and think, "how can namespaces be used to provide single global systems", then there's lots of ways you can answer that question, rather than thinking of ways in which it's a nonsense statement. e.g.
namespace MySystem
{
  extern int someGlobalValueModifyWithCare;
  void SomeGlobalProcedureWithHiddenSideEffects();
  float GetSomeHiddenGlobalState();
}
^^That's basically a singleton, without putting any of the implementation details regarding the singleton into your public interface.

#3Hodgman

Posted 09 November 2012 - 11:19 PM

If you take Khatharr's statement, and think, "how can namespaces be used to provide single global systems", then there's lots of ways you can answer that question, rather than thinking of ways in which it's a nonsense statement. e.g.
namespace MySystem
{
  extern int someGlobalValueModifyWithCare;
  void SomeGlobalProcedureWithHiddenSideEffects();
  float GetSomeHiddenGlobalState();
}

#2Hodgman

Posted 09 November 2012 - 11:18 PM

If you take Khatharr's statement, and think, "how can namespaces be used to provide single global systems", then there's lots of ways you can answer that question, rather than thinking of ways in which it's a nonsense statement. e.g.
namespace MySystem
{
  extern int someGlobalValue;
  void SomeGlobalProcedure();
  float GetSomeHiddenGlobalState();
}

#1Hodgman

Posted 09 November 2012 - 11:18 PM

If you take Khatharr's statement, and think, "how can namespaces be used to provide single global systems", then there's lots of ways you can answer that, rather that thinking of ways in which it's a nonsense statement. e.g.
namespace System
{
  external int someGlobalValue;
  void SomeGlobalProcedure();
  float GetSomeHiddenGlobalState();
}

PARTNERS