What language feature did you not appreciate until you'd used it for a year?
For me it was pattern matching. At first it looked like a fancy switch statement. After a year I write far fewer nested ifs and the compiler tells me when I forgot a case.
What feature grew on you slowly? Could be anything: generics, iterators, destructuring, a pipe operator.
Comments · 5
Iterators for me. Chaining map and filter looks odd at first, but it reads top to bottom and avoids a lot of temporary variables.
Exhaustive pattern matching is underrated for refactoring too: add a variant and the compiler walks you to every place that needs updating.
Type hints, or a proper type checker. Slower to write, but it prevents so many silly bugs once a codebase grows.
Does pattern matching make big conditionals easier to read, or is there a point where it gets harder than plain ifs?
It helps for handling several shapes of data, but deeply nested patterns can get harder to read. I split them into named helpers once they get long.