3 ms·
The "edge case" here is "I'm using dynamically typed language and some parsers implemented alternative wording for true/false"
by ilyt 4y ago
The "edge case" here is "I'm using dynamically typed language and some parsers implemented alternative wording for true/false"
- int_19h 4y agoIt was a part of the YAML spec for a long time, so it has nothing to do with dynamic typing or parser extensions.
- ilyt 4y agoIt does. If I define struct to contain boolean, Go yaml parser will always parse it to boolean If I define it as any other type, it will parse it as that type. So any conflicts like in the article just don't happen, or at worst, produce error in parsing. Static typing in this case acts essentially as schema
- lifehasleft 4y agoGo isn’t the only language using YAML