There should be a “return if” statement

Often times I find myself making some sort of "if (itemFound()) { return true; }" and it feels very redundant with how common it is. It would be nice if there were some sort of "return if (itemFound())" which would return true if satisfied otherwise continue. Maybe this already exists in some language but I don't know

submitted by /u/gggggggggggggggggggs
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/32pifJk

Leave a Reply

Create your own website, free on WordPress.com.Create your own website.
Start free
search previous next tag category expand menu location phone mail time cart zoom edit close