v.21.10Improvements

Support Implicit Conversions for Indexing in Maps

Support implicit conversions between index in operator [] and key of type Map (e.g. different Int types, String and FixedString). #28096 (Anton Popov).
Support implicit type conversions between the index used in the [] operator and the key type of a Map, allowing different Int types and conversions between String and FixedString keys.

Why it matters

This feature addresses the need for more flexible and intuitive access to Map values by permitting implicit conversions between compatible key types. It eliminates the requirement for explicit casting when accessing map elements, improving usability and reducing errors caused by type mismatches.

How to use it

Users can simply use the [] operator to access Map elements with keys of different but compatible types (e.g., different integer types or String versus FixedString) without needing to perform explicit type casts.