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

Is it normal to have 2000+ lines class?

Looks like an instant code smell to me.



I've seen 10000+ line classes in the corporate world


I've seen longer classes in the corporate world too. Such code was always buggy and hard to maintain.


Why? I know one should avoid "god objects" but if the class does a lot, many lines are needed, surely?


The whole idea of avoiding "god objects" is exactly in preventing classes from doing a lot.

https://en.wikipedia.org/wiki/Single_responsibility_principl...


Hahahahah! Good one, dennisgorelik!




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

Search: