Hacker News new | ask | show | jobs
by walking 3782 days ago
I went looking around for other opinions after leaving my other answer and found this SO question. You might be interested in glancing over it: http://programmers.stackexchange.com/questions/53086/are-reg...

It made me rethink a few of the ways I've used regions previously. As a stopgap for refactoring legacy code, though, I'm still not 100% sold.

Like a lot of articles here, the comments and the back and forth are as interesting as the answer. I think right now I'd say that, used carefully, there's nothing implicitly wrong with regions, but overall it's probably better to avoid them. Honestly, I'll probably have to do a little more digging and see where it comes out.

They're reminding me of comments in general at this point, where there's nothing implicitly wrong with them, but every time you write one you should be asking yourself if you could clearly bake that intention/information into the code itself.