3 ms·
> I don't always need to check types. I don't need to know that isReady returns a bool. It clearly returns a bool. I'm sorry but you're mistaken, friend. I ch
by merlincorey 8y ago
> I don't always need to check types. I don't need to know that isReady returns a bool. It clearly returns a bool.
I'm sorry but you're mistaken, friend. I checked the signature of that function and it actually returns an enumeration of ready states:
enum class Ready { Insert, Process, Clean };
const Ready isReady();
Static typing is extremely useful for knowing what things return - names are not.
- Ngunyan 8y agoI think you have to look at how you are naming your functions.
- jhall1468 8y ago> Static typing is extremely useful for knowing what things return - names are not. Only if you completely ignore convention (that is prefixes return bools) then, sure, it's not useful. But if you just want to break conventions, then all of this is moot because you are guaranteed to do stupid stuff outside of that.
- elbear 8y agoEven if you don't want to break conventions, you might do it by accident. If you don't have a compiler (or a static checker of some sort), there's no one there to keep you consistent.