4 ms·
Of course, the feature itself brings value, so you have to balance the cost and the value. If something is used a lot, you can expect the reader to learn the p
by laurentlb 4y ago
Of course, the feature itself brings value, so you have to balance the cost and the value.
If something is used a lot, you can expect the reader to learn the pattern quickly. If something is not super common and not intuitive, it can make the code less readable (and the reader might spend a lot of time searching in the documentation).
Two examples I've seen this week:
- Python has a new keyword `except*`
- C# has a prefix operator ^
It's not obvious to me that these features are beneficial in general.
- shanebellone 4y agoI love except. I use it for error handling and recovery.
- randallsquared 4y ago`except*` seems hard to search for and easy to confuse with `except`, raising some ambiguity about what you meant, here.
- shanebellone 4y agoYeah, I can see what you mean. I wasn't aware of "except*" aside from try/except.