Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> YAML is far to helpful to convert bare strings to what it thinks is right (like 1.20 to 1.2 or no to false

Versions of the YAML standard from the last 14 years don't do the later, and supporting numbers as a basic data type is, honestly, a weird thing to harp on as “too far”.

> The issue is not isolated to JS either, the same could have happened in python, php, or any other untyped language.

Indexing an associative array of runtimes that is keyed by a string, or doing almost anything else that expects a string, when you get a number instead, will fail with an error in most dynamically typed languages including Python and PHP; much fewer string-expcting operating operations (and particularly not object indexing) will fail in JS with a number.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: