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

I don’t remember if it did or didn’t have a single exit point.

But the thing as a whole didn’t follow any best practices I’ve ever heard of: the project also had what looked like a bizarre attempt to reimplement the concept of properties(!), in that the UI classes had fixed length arrays of all their subviews, which were accessed by constants. Each section of the UI had its own god class, where different views in that section were all the same class, called with a constructor that determined if a view ought to be created for any given constant.

There were also something like 20,000 blank comments. No idea why, the guy who added them didn’t even understand my question:

  int something = foo();
  //
  double baz = bar(something, 5);
That kind of thing.

(The project is no longer available and the business who made it has since closed, before anyone asks).



I was being tongue in cheek about people who religiously follow that "single entry and single exit to any function" rule and then get wrapped around the axle when a function needs to make several discrete sanity checks at the start before doing work.


Fair enough, it’s hard to convey tongue-cheek position in writing ^_^




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: