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

Overriding core methods is a definite no-no. And if you were actually going to distribute something, you'd probably have a new class descending from Array and add your methods to that.

But for private code - you've got a bunch of Arrays, you want them to output something interesting - what's wrong with that?



"But for private code...what's wrong with that?"

Reread my first sentence. I see nothing terribly wrong with monkeypatching for personal projects.




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

Search: