3 ms·
http://timelessrepo.com/json-isnt-a-javascript-subset http://timelessrepo.com/json-isnt-a-javascript-subset JSON isn't a strict subset of JS. Moreover, no, you
by MostAwesomeDude 15y ago
http://timelessrepo.com/json-isnt-a-javascript-subset http://timelessrepo.com/json-isnt-a-javascript-subset
JSON isn't a strict subset of JS. Moreover, no, you should never eval() things which are untrusted. Do you really trust everything the browser tells you? No? Then why trust JSON?
I'm not anti-JSON, I'm anti-JS. Browsers don't support other languages (except for VB, which bites, and Fx nightly support for Python, which I wish would become more widespread) so there's no choice in a browser. On the server side, though, you have a chance to use real languages, so you really should.
Oh, and also, you do know that XML-RPC, bless its ill-specified heart, is still around, right? There's a whole world of enterprise that isn't prepared to accept JSON-RPC.
- ender7 15y ago...I understand that eval() is dangerous. As noted in my comment. Anyway, what do you count as a "real language"? I assume you mean Java. Which is...fine. But Java is not the answer for everyone.
- MostAwesomeDude 15y agoJava, C, C++, Haskell, Python, Perl, Ruby, C#, Go, Scala, and Clojure are all better languages for systems development. (In no particular order.)
- human_error 15y agoNo love for OCaml and Erlang?
- htilford 15y agoIf JavaScript is such junk why hasn't any other language displaced it?
- MostAwesomeDude 15y agos/PHP/JavaScript/g in any other conversation about PHP; the same reasons all apply, including ease of learning curve, deployment inertia, etc. There's a massive amount of parallel community and language development between PHP and JS, and I feel that it's worth pointing out.