Open danielgomezrico opened 2 years ago
The idea makes sense, but we can't land it like this: it's a breaking change. Because it's a breaking change, we'll want to make all other similar improvements at the same time. That will need considerable work that I don't have time for right now--sorry.
By the way, it's like this for historical reasons, built_collection is from the Dart 1 days when types didn't give guarantees like they do now. So there was no point to having a stricter API back then.
Thanks. I do hope to fix this at some point--but no ETA I'm afraid.
Thanks for answering, I created the PR as a draft and empty because I wasn't sure about the change, and I was playing the unit tests to see if I was able to reproduce my runtime issue there.
I understand that this is a breaking change, and your argument, what should I do then? Can you guide me about which other places must be updated? I can add documentation about it too.
@dave26199 ping :)
Still no concrete ETA on a breaking change to built_collection, but I do hope to get to it this year; there is a small pile of issues building up.
@davidmorgan hi, friendly reminder
Thanks! I've just started making some breaking changes, so this is now in scope :)
But, it will take a while: there are quite a pile of tweaks like this to work through, and I want to get them all in before doing a release.
Hopefully, some time this year :)
Currently you will have a runtime exception if you try to build a map with the wrong types.
This will allow the developer to know at compile time if what he is intending to do will work or not, avoiding bugs.