Hacker News new | ask | show | jobs
by sureIy 716 days ago
> shows a notation that is clearly superior to json

I don’t see that at all? Why is `n:number=1` superior to `{n:1}`? If anything, CLI commands are awful for anything other than strings.

2 comments

But strings are often the most common case (or even, the only case that is needed). And they need much less punctuation. Compare:

    a=1 b=2 c=3
with

   {"a"="1", "b"="2", "c"="3"}
the json version needs 19 punctuation characters just to define three variables, against the bash version that only has 3. Which one would you prefer to type with your keyboard?
Depends on the shell. The following parses as a number in Murex:

    %{n:1}
https://murex.rocks/parser/create-object.html

I’m sure you can do similar things in other modern shells too. So the real problem is that people are stuck on the constraints of 1970s command lines.