Hacker News new | ask | show | jobs
by _flux 95 days ago
And why do we not anymore make use of it, but instead implemented separate JSON loading functionality in JavaScript? Can you think of any reasons beyond performance?
2 comments

I'd be surprised if there is a performance benefit of processing json with eval(). Browsers optimize the heck out of JSON.
You are arguing against the opposite of what the comment you answered to said.
Am i? "Can you think of any reasons beyond performance?" implies that the comment author thinks performance would be a valid reason.
Quoting my original message:

> And why do we not anymore make use of it, but instead implemented separate JSON loading functionality in JavaScript?

In other words: I'm asking for reasons why was native JSON JavaScript module created, if we already had eval.

> Can you think of any reasons beyond performance?

One of the reasons is that native JSON parser is faster than eval: give some other reason.

Why did you opt in for such a comment while a straight forward response without belittling tone would have achieved the same?
I actually gave it some thought. I had written the actual reason first, but I realized that the person I was responding to must know this, yet keeps arguing in that eval is just fine.

I would say they are arguing that in bad faith, so I wanted to enter a dialogue where they are either forced to agree, or more likely, not respond at all.