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 comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close