3 ms·
Personally, I don't agree with that because it makes things harder to read. I always use is_something (or isSomething, depending on the style used) form for fun
by kbart 12y ago
Personally, I don't agree with that because it makes things harder to read. I always use is_something (or isSomething, depending on the style used) form for functions that do some check and return a boolean value. It's really easy to notice such functions when reading code and understand their intend. Proposed computer_on_fire() is by far the worst example, the intention of such function is not clear by it's name and I would have to look it's definition/description to understand what it does. TL;DR using prefixes like is, set, get makes code much more readable.
EDIT: for your random number function I'd simply use get_random_number(x, y) too.