News for hackers. Stuff that matters.
Re:Idris 2 0.6.0 is now available for the JVM by zarzavat on Monday February 27, 2023 @08:16AM (#34956031)
TypeScript lets you fit your types to your data, whatever that data is. If your data includes mixed types, then you can represent those. If I have a JSON array that mixes numbers and strings then I can write (number|string)[].

Most other statically typed languages force you to fit your data to your types. Many statically typed languages simply degenerate into dynamic typing when trying to consume external data, e.g. by representing JSON as an enumeration of every possible JSON value type.

There are no comments on this comment yet.