3 ms·
Javascript does not conflate arrays and hashes. Technically Javascript does not have hashes at all, and you use bare objects instead, the confusion between obj
by masklinn 15y ago
Javascript does not conflate arrays and hashes.
Technically Javascript does not have hashes at all, and you use bare objects instead, the confusion between objects and Array comes from PHP reprobates.
Lua is an other language with no arrays, and where hashes are used in stead. Additional entrants in the category are ~~Tcl~~ (got corrected, Tcl's associative arrays are called "arrays" but it has a separate "list" type for indexed sequences) and Awk.
- jbellis 15y agoTcl doesn't really fall into this category -- Tcl's hashes are called arrays, but for sequential structures you would use a list instead.
- masklinn 15y agoOh crap, the terminology got me confused, I thought they were used the same. Fixing now.
- sjs 15y agoOk don't include JavaScript. So there is only PHP that does this? I'm just trying to find out where the article is coming from. I didn't think this was a common theme amongst languages.