upvote
Structured data as the communication medium between shell applications is so obviously a good thing, once you've used it, the Unix way of chopping up text with flags and formatting utilities seems barbaric. PowerShell got it half-right but blundered by talking in binary blobs of .NET objects instead of structured text; it was an understandable decision given how Microsoft worked at the time, but held it back from greatness.

But it's not clear how to get from here to there; Nushell doesn't seem to be catching on. I sometimes fantasize about adding two more standard streams, stdstructin and stdstructout, to go with stdin/stdout/stderr, which by informal or formal standard would write JSON (or whatever). Then coreutils and other programs could adopt them gradually and fall back to stdin/stdout whenever encountering a program not using them, and we could have gradual migration while keeping backward compatibility.

reply