News for hackers. Stuff that matters.
Re:What's wrong with Object-Oriented Programming and Functio... by quchen on Tuesday November 12, 2013 @06:14AM (#6717087)
That is not true. In C++ you can always retrieve the current time, store parameters in a database, print to stdout, or retrieve a global variable without changing the interface. Merely announcing purity to other programmers does not solve this problem: announcements can be wrong, missing, incomplete, and maybe most importantly the compiler doesn't know about them.
Re:What's wrong with Object-Oriented Programming and Functio... by emn13 on Tuesday November 12, 2013 @07:03PM (#6722363)
Heck, mere "announcements" might even be quite useful, especially since it is slightly compiler supported. But const in C++ does not announce purity, nor does it announce thread-safety. I just announced that it won't observably change non-mutable members, that's it.