Before rewriting your code to use named tuples in pattern matching, keep in mind that there are situations where the "old" approach with a bunch of underscores can be a better option. #scala https://cdn.nostrcheck.me/f5c3f597f754f534d47b0be2b9afe263894ecdad3d639453c4abc31f40db2c23/86547c7f8dbe5a1a7309665bcab2f6fd8915fdf30760483d6c3bdbec810911bc.webp

Reply to this note

Please Login to reply.

Discussion

My point is that in a huge codebase, it could be a better option to be reminded by the compiler that there is a new field and you should adjust the relevant functions. If you use named tuples in such a match, this function can be easily overlooked.