News for hackers. Stuff that matters.
Re:Why bad scientific code beats code following “best practi... by jwatte on Sunday August 28, 2016 @02:41PM (#12377808)
Getters/setters are important when the data structure is used from a different linkage unit than where it is defined, and binary compatibility across versions is important.

That doers happen, but usually in fewer cases than most intermediate programmers realize. Instead, they see cases where it is used for real (like winforms or Direct3D) and cargo cult it into all code they write.

Re:Why bad scientific code beats code following “best practi... by blahedo on Sunday August 28, 2016 @03:11PM (#12377970)
> they see cases where it is used for real (like winforms or Direct3D) and cargo cult it into all code they write.

And a lot, a lot, of my CS prof colleagues believe it is deeply important, for reasons most of them are unable to articulate, that in an intro CS1 class all instance variables be private and accessed only through getters and setters. This is actually baked into the College Board's course description for AP CS A, and a point or two (out of 80) often hinges on it in every exam, so it is near-universally taught in high-school level CS classes (in the US). Sigh.

Re:Why bad scientific code beats code following “best practi... by qwertyuiop924 on Sunday August 28, 2016 @04:56PM (#12378488)
So I have to write BS for AP CS A, and I have to do it in a bad language, and we'll never get Python or Lisp?

Okay, College Board, I warned you...

smack

this is for the above.

smack

and this is for teaching CS poorly in general.

smack

and this is for making us all by overpriced graphing calculators, thus keeping demand high...

Re:Why bad scientific code beats code following “best practi... by quotemstr on Sunday August 28, 2016 @03:32PM (#12378082)
The kinds of things you need to do in order to maintain a stable ABI are not the kinds of things you should apply to all parts of your program. That way lies madness.

BTW, you don't need accessors even for public ABIs. stat(2), for example, doesn't need "accessors" for struct stat and it's been stable for decades. The same idea applies to Win32 core APIs.