News for hackers. Stuff that matters.
Re:Douglas Crockford: “We should stop using JavaScript” by yakshaving_jgt on Monday June 12, 2023 @10:33AM (#36294161)
> Crockford has been a net negative to JS for 20 years now.

I'd say JSON is pretty successful as a protocol, even beyond JavaScript.

Also The Good Parts is probably as important now as it was when it was published. The language hasn't improved — it's just grown.

Re:Douglas Crockford: “We should stop using JavaScript” by taeric on Monday June 12, 2023 @10:54AM (#36294656)
JSON is a protocol? I'm not sure I follow.

That said, JSON is still an interesting study. Basically, "take the object literal syntax of javascript, get rid of functions, require double quotes, don't recognize comments." It is good to get folks to stop using 'eval' to pull some data into the browser, though it is a shame that couldn't have been preserved a bit more safely.

And, of course, json-lines and then the steady expanse of json-schema is looking to be hilarious. How long until we add in namespaces to the idea? :D

Re:Douglas Crockford: “We should stop using JavaScript” by yakshaving_jgt on Monday June 12, 2023 @11:13AM (#36294974)
Ok, perhaps not strictly a protocol, but a data format. I'm using the word a little more loosely than some dictionaries suggest, though it appears to comport with this definition published on Cloudflare.

> In networking, a protocol is a set of rules for formatting and processing data. Network protocols are like a common language for computers. The computers within a network may use vastly different software and hardware; however, the use of protocols enables them to communicate with each other regardless.

https://www.cloudflare.com/learning/network-layer/what-is-a-...

Re:Douglas Crockford: “We should stop using JavaScript” by taeric on Monday June 12, 2023 @11:30AM (#36295203)
Protocol typically implies a conversation. Expectations and messaging.

That said, synonyms all over the place. So, I can see it. I think I would avoid it here, as this would also make "mp3" a protocol. Data format already covers that, though. Whereas something like WebRTC seems more in the protocol vein.

Re:Douglas Crockford: “We should stop using JavaScript” by SoftTalker on Monday June 12, 2023 @12:54PM (#36296682)
I think many people think of JSON as a protocol as it's almost always used in the context of HTTP, which is a protocol. They're just combining the data format and the protcol when they say "JSON"
Re:Douglas Crockford: “We should stop using JavaScript” by taeric on Monday June 12, 2023 @01:13PM (#36297119)
I mean, sure? But I don't think we'd accept people calling HTML a protocol, would we?
Re:Douglas Crockford: “We should stop using JavaScript” by tuukkah on Monday June 12, 2023 @02:24PM (#36298501)
You should have a look at JSON-LD: a major part of it is adding namespaces ("prefixes") and a default namespace ("@vocab") to JSON: https://www.w3.org/TR/json-ld11/#compact-iris
Re:Douglas Crockford: “We should stop using JavaScript” by taeric on Monday June 12, 2023 @02:54PM (#36299076)
Oh wow. At what point do we just switch back to XML?