Hacker News new | ask | show | jobs
by mofle 26 days ago
1. It's in the spec. It's a binary64 double.

2. These are schema and app concerns. Schema is something I plan to tackle.

1 comments

> These are schema and app concerns

Discriminators are one of the fundamental building blocks of composition (sum types in ADT parlance). The workarounds for expressing them are verbose, ugly, and complicate schemas.

Consider `shape: circle: { radius : 1}` vs the workarounds like `shape: { type: circle, radius: 1}` or `shape: { circle: { radius: 1 }`.