Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mt3o19135yThat document is exaggerated... I don't want to elaborate on this having broken wrist, but those problematical cases - are far from real life... You have to try real hard to get into those problems.
-
@mt3o Mostly agreed, but I've been personally bitten by a couple of those issues. One is how string words like "yes", "on", and "true" (and a few others) evaluate to a boolean True, and another is the fact that 1.0.0 is a string but 1.0 is a number.
YAML often violates the principle of least surprise.
Perhaps most annoying is significant whitespace combined with a strict prohibition on using tabs. -
mt3o19135y@Karunamon 1. 0 vs 1.0.0 is obvious to me. You can't parse the latter into a float.
Regarding yes vs true it's also obvious.
Those values are not informational plaintext but values that are parsed into strict types and have to be treated as such. You want a string, be explicit. Otherwise, the closest type will be matched.
I see your examples in similar manner as 0.1 + 0.2 != 0.3 in any IEEE754 complaint scenario.
Perhaps I see this differently than you because I already tried coding my own tokenizer and parser for my own config file format... -
I've always hated YAML because my gut feeling was telling me it's bad. Good to see that it actually is. For my scripting language I have 4 core design rules: Consistency, predictability, reliability and conciseness. Apart from the last YAML breaks every single one
-
@PrivateGER I haven't dealt with YAML that much tbh, but I can already assure you XML is, at the very least, as bad as YAML
-
@codebanana I deal with XML and it makes much more sense than YAML. I much prefer it over YAML.
-
@PrivateGER I've seen some "apocalypse now" level XMLs too, so i wouldn't be so easy on it either
@12bitfloat i had that gut feeling too
@mt3o > you want a string, be explicit
that is terrible beyond any good will and redemption reasoning.
if not being explicit can lead to bad side effects and there's not much benefit to it, why would they leave that in?
that's some troll design, as if they designed it hoping to cause as much bugs as possible
sure, i can be explicit, but i can't force these major projects that are not explicit on their ymls to be -
@jesustricks I have also seen some horrible XML and still prefer that shit over YAML any day.
-
@Plasticnova why "for the record" though? it's not like you were saying anything hinting a possible dislike of yml that you could clarify
-
@Plasticnova you're gonna double down on bad english? i would have taken a "mb"... just delete account man...
-
@jesustricks I can see this really bothers you. For the record, I'm ok with that
-
sangye05yAfter being from the old times of programming and just debugging my first yaml files i was flabbergasted that anyone would make this.
Fuck. YAML.
Who the fuck thought this was a good idea?
rant