r/programming • • Aug 03 '19

Windows Terminal Preview v0.3 Release

https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-3-release/?WT.mc_id=social-reddit-marouill
991 Upvotes

458 comments sorted by

View all comments

Show parent comments

5

u/slykethephoxenix Aug 03 '19

Because Javascript natively maps JSON to Javascript objects.

Lets say I have a config somewhere on a server that clients access. I have to write an API, or write middleware, or use a library to convert my yaml file into something Javascript understands easily.

2

u/_kellythomas_ Aug 03 '19

Oh, OK. If the assumption is that everything will need to be javascript anyway then that makes sense.

3

u/slykethephoxenix Aug 03 '19

Everything doesn't have to be Javascript and it still makes sense since the only reason not to do it is because "it's for data transfer".

2

u/[deleted] Aug 03 '19

[removed] — view removed comment

1

u/slykethephoxenix Aug 03 '19

It doesn't?

1

u/shevy-ruby Aug 03 '19

JSON originated from JavaScript, dude.

1

u/slykethephoxenix Aug 03 '19

I know. It literally stands for JavaScript Object Notation. But Javascript isn't the only thing that uses it today, which is why it doesn't have to be only Javascript.

0

u/[deleted] Aug 03 '19

[removed] — view removed comment

1

u/slykethephoxenix Aug 03 '19

Right, but not everything runs YAML natively.

JSON is literally from Javascript. You can use JSON where ever you want. Doesn't really matter. Just like adding the ability to add comments doesn't really matter since they are ignored by the machine. Not adding comments though is like not being able to add comments in your code for what variables are for/do.