News for hackers. Stuff that matters.
Re:C Legacy Is Evil by ChrisAntaki on Tuesday November 04, 2014 @04:37PM (#8559183)
The language just gave you a block of memory. It lets you decide whether you'd like to dedicate resources to clearing that memory.
Re:C Legacy Is Evil by mamcx on Tuesday November 04, 2014 @05:09PM (#8559361)
Ok, so for what is usefull to have garbage after get memory?
Re:C Legacy Is Evil by J_Darnley on Tuesday November 04, 2014 @05:25PM (#8559435)
Why do I need to zero an image array if I am about render something into it? You spend time setting each byte to zero.
Re:C Legacy Is Evil by JoeAltmaier on Tuesday November 04, 2014 @05:35PM (#8559476)
That, and when your constructor is going to initialize every field, and when you're going to clone a copy of another structure...
Re:C Legacy Is Evil by mamcx on Tuesday November 04, 2014 @05:39PM (#8559495)
I understand if I get null/empty... but garbage?

And in relation to this post, the behaviour is not the same across compilers/archs? Thats nuts.

Re:C Legacy Is Evil by notacoward on Tuesday November 04, 2014 @06:08PM (#8559627)
Welcome to programming in the real world. If that's the nuttiest thing you have to deal with on any given day, it's a good day.
Re:C Legacy Is Evil by mamcx on Tuesday November 04, 2014 @07:14PM (#8559852)
Yep, I know programing is hard. +18 years of it.

Is crazy the amount of punishment a developer accept, and when the fail is elsewhere, it blame itself ;)