3 ms·
I'm familiar with the trade-off. But I disagree that there's a choice to make between safe and powerful. It is possible to make safe behaviors by default, while
by yyyfb 3y ago
I'm familiar with the trade-off. But I disagree that there's a choice to make between safe and powerful. It is possible to make safe behaviors by default, while leaving the door open for more advanced behaviors. I guess code linters can help as crutches. But the right abstractions too.
It's the motivating example for languages like C++ in the first place (over assembly): type safety, easier reasoning about control flow, etc.
Note how the case here is very simple - waiting on a variable to change - but advice just boils down to "be more careful" instead of "here's the foolproof way to do this". You can only ask a programmer to watch out for so many things, and C++ has way too many of these things.
- PaulDavisThe1st 3y agoIt's not safe vs powerful, typically. It's more often safe versus performant.