« first day (103 days earlier)      last day (790 days later) » 

6:21 AM
@hyde Yes. That's UB.
@FredOverflow You hate me? :(
There are certain useful UBs. For example, any of the UBs related to sequence points in C permit some very useful optimisations. Without them, premature optimisation would actually serve a purpose.
 
7:14 AM
@undefinedbehaviour What makes you say that?
 
8:10 AM
0
Q: How to get rid of singletons in PHP

ripedarI recently found out that singletons are bad. I couldn't find answer how to recreate my current code to be without singleton. What i have now: class checker { private static $inst; public static function getInst() { if(!isset(self::$inst)) throw new Exception("Error 13: Check ...

 
 
3 hours later…
11:32 AM
0
Q: How to use singleton and pure virtual function together?

Rasmi Ranjan Nayakclass base{ static base* m_selfInstance; public: static base* GetInstance(); virtual void abc() = 0; }; class der:public base{ public: void abc(){cout << "Derived...\n";} }; base* base::m_selfInstance = NULL; base* base::GetInstance() ...

 
 
8 hours later…
7:51 PM
0
Q: Dynamic-length array using Singleton

tmwoodsOkay, I am way outside my comfort zone here and am struggling with new concepts but I hope I can make myself clear. As I understand it, global variables are very bad in C# (and are dangerous in general) but I don't really want to get into that debate. After some research I am led to believe that...

 

« first day (103 days earlier)      last day (790 days later) »