4 ms·
Yeah the third parameter would by chance save the situation here but it's not a rule that you'd always be protected. Also it would be perfectly fine to cast par
by patates 4y ago
Yeah the third parameter would by chance save the situation here but it's not a rule that you'd always be protected. Also it would be perfectly fine to cast parseInt to (String, Integer, _) in a sufficiently smart type system.
- danbruc 4y agoThe third parameter, I would argue, is a bit wired to begin with. If you need the entire collection, then you are probably doing more than map(), and if you really need it, then you could probably just close over it. But with that somewhat wired third parameter removed, you are right, that is something you could easily run into in a typed language.