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

Pretty much, though some would contest calling strings “objects”.

The spec indeed goes through some trouble to ensure they are pure value-types and do not exhibit any reference-like semantics, for instance by prohibiting their use as keys of WeakMaps and WeakSets - along with numbers, booleans, nullish values, and bignums.



[flagged]


In the context of a discussion on JS, the spec assigns a very specific meaning to the term “object”, one which value-types do not satisfy. That is, indeed, the entire point of this thread, and to suddenly switch terminology then ramble about how you’re better than “script kiddies” screams rhetorical incompetence.

It's clear that you don’t know JS. I was trying to help you understand one interesting design decision they make, but you’ve taken to personal attacks against the entire community in a way that I don’t find worth humoring. Good day.


I already understand the design space and all the implications of strings being immutable and indistinguishable objects if they are the same character sequences; where JS sits in that space is just trivia (which I easily looked up myself).

Indeed, I don't know JS well enough to have a rote memory of where it sits in every design space, or which words it specification does not use for what things. There are plenty of languages in whose specifications object has both the broader meaning, and the more specific OOP meaning. People don't get confused somehow.

Conversely, not everything we can say about a Javascript program necessarily has vocabulary in the Javascript spec; we're going to end up using outside words one way or another.

(I'm not interested in Javascript, actually; this is just a "drive by" for me, because I am interested in the submission topic. All that I will ever know about Javascript will always come from doing the minimal amount of research to answer some question out of some kind of necessity.)




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

Search: