Hacker News new | ask | show | jobs
by jmull 2935 days ago
Maybe someone can comment, but I can't understand the value of this.

The meat of this proposal is the specification of the envelope. But it consists largely of things you would have to decide how to map to your application domain. Since there's no reason different apps would/could map these things the same way, there's no opportunity for interop created here.

I guess it ends up as an idea or example of how you might express a generic message in JSON. So that's of some use.

2 comments

Agreed. There clearly is a decent amount of work put into this but it hasn't been thought through. And I'm not even sure that what is there is well specified; for example, you can have priorities of 1-10 and we are told that 1 is the lowest and 10 is the highest. We are also allowed to instead use the words 'low' 'normal' and 'high' for priority but we are never told how those relate to the numeric priorities (e.g., is '10' higher than 'high'?)
The spec describes a message format and isn't intended to be a formal Internet RFC. As such, the thought was to leave definitions up to users rather than dictate things like priority ranges.
I agree. There is already a universal message format and it's called plain text. Wrapping that in JSON brings nothing to the table except very slightly slower parsing.

Web folks love JSON and rightly so, it solves many things in JS-land. It is not a useful message format if you are interested in high efficiency or small message sizes. In those cases fully binary messages are the way to go, of course.

If there were two things I would tell the web devs at my employer, they would be these: There is no universal message format that does not already exist, and web tech doesn't solve non-web problems better than non-web tech.

Bonus third thing: JavaScript rots your mind. Avoid it.

> Bonus third thing: JavaScript rots your mind. Avoid it.

Could you elaborate on your hyperbole? What exactly "rots the brain"? Is Javascript deficient in some fundamental way that irritates you? Or do you merely object to its 20-something year history of use on websites?

Javascript is the only language that browsers support. Would you prefer if browsers historically supported only Python instead of Javascript?

Expressing only emotions toward a tool is inefficient and hinders improvement of the tool. Please help the conversation by identifying specific issues or failings.

It's just a poorly designed language that teaches the wrong things. Once the things it teaches are learned they are difficult to unlearn. You forget how to do things without JavaScript when you write JavaScript for a while. You forget how to do much of anything that is not JavaScript.
> * Once the things it teaches are learned they are difficult to unlearn.*

Could you describe one of these "things it teaches"? Is it a concrete concept like ternary operators? Having gone through Excel, VB briefly, and Powershell, Javascript was my first exposure to ternary.

I'm not sure we agree on much, because plain text, by itself, is just an encoding. A message format also needs a syntax and a parser both of which you get with JSON, if you can live with its gaps. (You also need a schema and typically end up needing things like query APIs, storage, queues, etc., which JSON doesn't get you but which is often supported by a wide range of solutions that do.)
> Bonus third thing: JavaScript rots your mind. Avoid it.

Grow up you child

Please keep discussion civil.