▲ | voodooEntity 2 days ago | |||||||
I see your argument tho maybe im just not getting the real use case. Because when saying defaulting back to string and thatfor ignoring typing, wouldnt that just be the same as beeing typeless? Therefor doesn't every format support string therefor supporting typeless? Also, in how many cases do you need to parse the same configuration in multiple different languages? Im not saying its not useful - i just try to get the use case for this arguments. | ||||||||
▲ | anentropic 2 days ago | parent | next [-] | |||||||
I think parsing the config in multiple target langs is definitely a counter-example where having a type system in the config lang can be useful as a lowest common denominator that you then conform all the parsers too | ||||||||
▲ | crabbone 2 days ago | parent | prev [-] | |||||||
Here's an actual case I ran into with JSON and it's bizarre number treatment: Neo4j uses 128 bit ids. The JSON API retrieves these ids as strings of digits, Python library reading this JSON decided to interpret these as double precision floats. And sometimes it works, other times: not so much... The whole selling point of configuration formats is to allow multiple languages to access the same data. So, cases when multiple languages have to read the same configuration format are exceedingly common. The fact that the format supports other types means that someone (probably not you) will use those types, and then (probably you) will have to deal with the mess created by that person. I don't trust programmers in general to write good code... if possible to prevent them from writing bad code, then why not? | ||||||||
|