4 ms·
Great questions (author here). > The argument against JSON Schema presented in the readme is that is is too expressive. Can someone explain to me, as someone w
by seagreen 9y ago
Great questions (author here).
> The argument against JSON Schema presented in the readme is that is is too expressive. Can someone explain to me, as someone who's used JSON Schema before, why this should concern me?
If it doesn't affect you, then it doesn't affect you:)
The people who is does concern are tool authors. Trying to make an editor that handles schemas including things like "if field A is a string and matches regex X, then field B must match schema Foo instead of Bar" is really hard.
I believe the name for this in type theory land is dependent types.
> Compiling a subset of Haskell's type system to a JSON Schema just seems completely overengineered to me?
The subset of Haskell used is actually far, far simpler than JSON Schema. It's basically just parametric polymorphism and algebraic data types. They're my two favorite things from Haskell, and both are really simple.
- akst 9y ago> It's basically just parametric polymorphism and algebraic data types. They're my two favorite things from Haskell, and both are really simple As a Haskell programmer I agree on the simplicity point, but you may want to use simpler terms if you're trying to sell someone on simplicity (in reference to parametric polymorphism and algebraic data types) Cool project though!
- sjg007 9y agoSo what are the simpler terms? Any examples?
- akst 9y agoYou could probably say Generics instead of Parametric polymorphism, while far less formal a lot more people will grok what you're getting at. I guess it's not so clear for algebraic data types, but I'd probably refer to swift enums or unions in elm as an example. Last time I suggested this, someone likened it to intellectualism, lol. I see it more as a communication, a thing that the typed functional community seems to struggle with
- akst 9y agoSigh, I cannot edit my comment at this stage, but correction I meant *anti-intellectualism