General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Brent Jacobs
ThePrimeTime
comments
Comments by "Brent Jacobs" (@br3nto) on "XML is better than YAML | Prime Reacts" video.
3:26 a version number isn’t actually a number. It’s a complex object represented as a string of numbers separated by .’s. So yes, dropping the 0 from 1.20 is fine because it is actually the same number.
1
The doofus making the complaint is most likely using YAML syntax that looks like this: ‘version: 1.20’. As per 2.4 of the YAML spec, this will be interpreted by the parsing language, and in most instances will be interpreted as a numeric type rather than a string. In the blog post, however, they make it look like they used the syntax ‘version: Go 1.20’. However, applications would always interpret this as a string and therefore not drop the 0. This is PEBKAC plain and simple. If the person wanted the version number to be interpreted as a string, they should have used either ‘version: !!str 1.20’ or ‘version: “1.20”’. It’s as simple as that.
1