Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They're not bad. Just redundant.


And redundancy _is_ bad.


Redundancy is not always bad. It allows concurrent evolution in your code, specialization, and info hiding, because each copy is in a more specific context and you know just what you want from it there.

Related: http://yosefk.com/blog/low-level-is-easy.html

In Objective-C writing headers by hand gives full manual control of what your library's users get to know about your class, including comments. Internal things just don't appear in the first place.

C++, of course, makes it impossible to hide anything from your users because they need to allocate your class themselves, you need to put all your private ivars and methods in the public class definition, and you can't add ivars to the class later. But that's its problem.


> C++, of course, makes it impossible to hide anything from your users because they need to allocate your class themselves, you need to put all your private ivars and methods in the public class definition, and you can't add ivars to the class later.

On the other hand, actual practice: http://www.gotw.ca/gotw/024.htm


Oh, but Objective-C does the right thing using the standard and simplest way to write it, and you can subclass other people's classes and everything!

http://stackoverflow.com/questions/12522053/what-is-a-non-fr...


Depends. Other times we call it "backup". Or "failover".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: