Single-Entry, Single-Exit, Should It Still Be Applicable In OO? (msmvps.com)

published 1 year, 11 months ago, submitted by PeterRitchiePeterRitchie(1425) 1 year, 11 months ago

Does the "Single Point of Exit From a Function" Principle still applicable in Object-oriented programming?

1 comment | category: | Views: 6

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

posted by samdnpsamdnp(970) 1 year, 11 months ago

Early return in this case is far better. Writing single-exit is a bit of an art, but with modern compilers it doesn't matter with performance so much.

information Login or create an account to comment on this story