Recent submissions

Comment · 3 years ago
Convex provides automatic type safety all the way from your database schema to your React app. How does it work? Hint: we use some wild TypeScript.
Comment · 4 years ago
Very short! We're trying to get beta keys to all of you today! :)
Comment · 4 years ago
Absolutely. But if you decide to use Cloud Functions with Firebase you have to give up the reactivity and automatic optimistic updates that Firebase normally provides.

Part of the difficulty of writing about Firebase is that it's actually a whole collection of tools with a host of complex tradeoffs. But that's also a lot of the difficulty in using it as well! Understanding when to use Cloud Firestore vs Realtime Database and when to load data directly vs via Cloud Functions are all complex questions with unclear answers.

Comment · 4 years ago
Thanks for the pointer! I'll update the article to be more accurate!
Comment · 4 years ago
Author here! I think the comparison between Convex and Supabase is quite similar to Convex vs. Firebase! Supabase also encourages developers to load individual SQL queries from the client, supports edge functions without having a reactivity story for them, etc. Superbase is designed to be a Firebase alternative and appears to be taking most of their high-level approach.
Comment · 6 years ago
Well discriminated unions are TypeScript's implementation of ADTs (but whether they are "clean" is could be debated)
Comment · 6 years ago
I think that Flow’s approach of using nominal types for classes and structural for everything else makes more sense. Are there really cases you expect classes to be structural types?
Comment · 6 years ago
That’s not always true. If you are going to print the object to the console or send it in a network request it’s possible that the additional property is important.
Comment · 6 years ago
> In Java you can assign any non-primitive typed expression to a variable of type Object.

Sure, but if you do this in Java you must use different variable names for the reference of type Animal and the reference of type Object.

I think algebraic data types and type refinement are great, but I’m not a fan of automagically changing the types of variables in different scopes if it can’t be applied consistently.

Comment · 6 years ago
Thats not 100% true in TypeScript. TypeScript actually only allows "up-casts" and "down-cast" (but if the type is neither a supertype nor a subtype the compiler will throw an error).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton