2 ms·
You can have typed dictionaries too, even in a language similar to PHP: https://mypy.readthedocs.io/en/stable/more_types.html#typeddict https://mypy.readthedocs
by iso8859-1 6y ago
You can have typed dictionaries too, even in a language similar to PHP: https://mypy.readthedocs.io/en/stable/more_types.html#typeddict https://mypy.readthedocs.io/en/stable/more_types.html#typedd...
But anyway, I'd prefer anonymous records like in F#. There's no reason to have static and dynamic mappings have the same syntax, especially if they're not the same to the type checker, even a compiler could statically dispatch the static variant. So I agree with you that dicts are overused.