by RobinL · 8y ago · 0 comments
I don't have any relevant json extensions, but VS Code started auto-suggesting values for options (e.g. a drop down for whether the chart type is a 'bar', 'line', etc.) and pointing our mistakes like 'the size should be an integer not a percent'.
This was the lightbulb moment for me - as if by magic, my code editor was double checking my json document was valid and helping me write it. Amazing, and super useful.
It took me a while to work out how it was doing it, but all vega lite examples start with the magic:
"$schema": "https://vega.github.io/schema/vega-lite/v2.json".
Make my tools do the grunt-work for me, thanks, so I can focus on the actual problem domain.
I agree, with the caveat that sometimes you need an escape valve.
Basically I want static typing 99% of the time and I don't want guff from the compiler (or fanboys) in that 1%.
They’re supported by all general purpose programming languages because we — as developers — are smarter than the compiler.
2. Not “all general purpose programming languages” support exceptions. To name a few that don’t: C, Rust, Go.
In my experience, those tend to be either json, yml or plain terminal args regardless of the fact that the language is typed or not.
Am I missing something?
Unfortunately it doesn't perform validation, nor implement all validation annotations - but it definitely helped me get started.