cmccabe commented on PR #13280: URL: https://github.com/apache/kafka/pull/13280#issuecomment-1500597366
It's messy to have to go through a conversion function to use standard interfaces. The fact that we have to do it in Scala is a big negative for Scala. I'm greatly looking forward to no longer having to do this once we get rid of Scala. I would like to never again have to convert between (or ponder the difference between) a `collections.Seq` and a `collections.immutable.Seq`, or a scala map versus a java map. Also, as you yourself argued, converting back to java.util.Map loses type safety, since now we don't know if we have a persistent map or not. It is quite useful to know that your map is immutable, even if I doubt that confusion between regular types and persistent ones will be as common as you suggest. Most importantly, I don't think the delta between a wrapper type that implements java.util.Map and one that doesn't is that big. Like I said earlier, we did this in TimelineHashMap and other places. While I'd prefer to not have wrappers, if we must have them they should not require downcasting to be useful. If you want I can raise a PR to implement the standard interfaces. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org