Hacker News with Generative AI: Type Safety

Hyper Typing (pscanf.com)
Lately I’ve been trying out a few libraries that - in pursuit of perfect type safety - make their typings so complex that it makes them almost unusable, in my opinion. I call this approach hyper-typing, and I worry it’s becoming a trend in the TypeScript ecosystem.
Goenums: Type Safe Enum Generator for Go (github.com/zarldev)
goenums addresses Go's lack of native enum support by generating comprehensive, type-safe enum implementations from simple constant declarations.
Sqlc: Generate type-safe code from SQL (github.com/sqlc-dev)
sqlc generates type-safe code from SQL.
Making WebGL typesafe in Idris 2 (drbearhands.com)
I’d wanted to learn Idris for a while, and see how far I could realistically take type-safety. In particular, can I ensure all documentation of the WebGL spec is encompassed in types? (thus achieving correctness-by-construction).
Type safe variadic printf (stranger.systems)
While C can provide "convenient" string formatting by having hideously unsafe variadics, and dynamic languages, like python, can do the same, many type safe languages, such as Rust, are forced to provide such functionality through the use of a macro. Dependently typed languages, like Idris, can provide a printf like formatting interface, while maintaining both memory and type safety, without the need for macros. We will explore this by implementing a simplified version of printf in Idris from scratch.
Encore – Back end framework for type-safe distributed systems (encore.dev)
🚀 Launch Week Dec 9-13: See all the new features
Go and Java: Rethinking Type Safety for the Pragmatic Age (rohan.ga)
I want to explore where mainstream programming languages are headed, using Java and Go as my primary subjects.
Sqlc: Compile SQL to type-safe code (sqlc.dev)
sqlc generates fully type-safe idiomatic code from SQL.
TypedSQL: Make your raw SQL queries type-safe with Prisma ORM (prisma.io)
Using Jai's Unique and Powerful Compiler for Typesafe Units (forrestthewoods.com)
Type Safety Doesn't Matter (2023) (fpcomplete.com)