4 ms·
> Give me an API that takes a key/value pair where key is the name of the field to be set, and value is the value to be set. Not in a statically typed language
by Smaug123 5y ago
> Give me an API that takes a key/value pair where key is the name of the field to be set, and value is the value to be set.
Not in a statically typed language, please! It should be a compile-time error to try and set the key `Kye`.
- nybble41 5y agoI agree with the compile-time error checking part, but it's possible to have groups of key/value pairs (i.e. anonymous records) in a statically typed language where only specific keys are allowed, with specific value types for each key.