Project ideas from Hacker News discussions.

Functional programming and reliability: ADTs, safety, critical infrastructure

📝 Discussion Summary (Click to expand)

Based on the Hacker News discussion, here are the four most prevalent themes:

  1. The definition and scope of "functional programming" are ambiguous and contested. Multiple users argued that the term "functional programming" is too broad and ill-defined to be useful, especially when functional techniques are now mainstream in non-FP languages. > "The term 'functional programming' is so ill-defined as to be effectively useless in any kind of serious conversation." — mightybyte > "You'll see people here saying things like LISP wasn't real FP because it didn't match their Haskell-colored expectations. Meanwhile for decades LISP was the canonical example of FP." — jghn

  2. Static type systems, ADTs, and immutability are the primary reliability drivers—not FP in itself. The discussion repeatedly separated the benefits of static typing, Algebraic Data Types (ADTs), and immutability from the broader label of functional programming. These features are credited with catching errors at compile time and preventing invalid states, a practice that is also evident in modern, non-FP languages like Rust. > "Almost all of the benefits of functional programming come from functional programming itself, not from static types, but one would never get that impression from the papers presented there." — aag > "Static types and ADTs are orthogonal to being FP, as Rust clearly shows." — brabel

  3. Strongly-typed FP improves reliability, but dynamic languages are viable with discipline and tests. A central debate emerged between proponents of static typing, who argue it eliminates whole classes of runtime errors, and advocates for dynamic languages (like plain JS), who value malleability and speed. The dynamic camp concedes they must compensate with rigorous testing, architecture, and conventions. > "In dynamic languages, you are the type system." — keyle > "My point is simple to the point of stupidity: there's just more stuff on screen when you have to write User twice... I write tests. I use architecture to defend against the risk of super-rare code paths..." — conartist6

  4. Practical reliability requires fault tolerance and design, not just correct-by-construction code. Several users pushed back on the idea that "correctness" alone ensures reliability, especially in complex systems like banking and telecom. They argued that real-world systems depend on fault tolerance, reconciliation, and defensive design, as unpredictable failures are inevitable in complex, distributed environments. > "Reliability is only a means. Not the end. Also the human parts of the business would need to be simplified in order to model them. If deviate from the model that could invalidate it." — charcircuit > "In a sufficiently complex system—all interesting and important software projects—functional programming is not strong enough a tool to prevent even a sliver of potential accidents." — thundergolfer


🚀 Project Ideas

TypeScript Opaque Types Plugin

Summary

  • A VS Code extension and TypeScript compiler plugin that implements Flow-style opaque types via a new opaque keyword, preventing structural equivalence while allowing type inference.
  • Core value: Brings opaque types to TS, solving the "brittle, crystalline" feel of TS code and enabling correct-by-construction patterns without Flow migration.

Details

Key Value
Target Audience TypeScript developers frustrated with missing opaque types (e.g., auggierose: "It should really be part of TypeScript")
Core Feature opaque type UserId = string; enforces nominal typing at compile-time, with ergonomic inference and no runtime overhead
Tech Stack TypeScript compiler API, ts-morph for AST manipulation, VS Code extension API
Difficulty Medium
Monetization Hobby

Notes

  • HN users crave this: conartist6 laments TS lacks opaque types; auggierose questions internals—plugin proves it's feasible without breaking changes.
  • High discussion potential on TS evolution; immediate utility for startups doing "correct-by-construction" in JS/TS.

Python ADT State Machine Builder

Summary

  • CLI tool and library generating exhaustive state machines as frozen dataclasses with Pydantic validation, mypy exhaustiveness checks, and match statements for Python 3.10+.
  • Core value: Makes "illegal states unrepresentable" viable in Python dayjobs, combining static checks with runtime parsing for messy enterprise data.

Details

Key Value
Target Audience Python devs in fintech/enterprise needing reliability without Haskell (e.g., fud101: "what about Python if you're stuck using it")
Core Feature YAML/JSON schema input → auto-generates tagged unions, validators, transitions, and assert_never for forgotten cases
Tech Stack Pydantic v2, mypy, Ruff, Click (CLI), dataclasses
Difficulty Medium
Monetization Revenue-ready: Freemium (CLI free, hosted schema editor $10/mo)

Notes

  • Directly addresses rastrian's tips and beders' runtime validation need: "Using a schema/spec/type library at runtime that is even more powerful than ADTs."
  • Practical for banking/payment workflows; sparks HN threads on dynamic-lang reliability hacks.

LLM Type-Guided Code Generator

Summary

  • Web service integrating GPT-4o/Claude with strong type systems (Haskell/Rust/TS), where users provide types/interfaces first, generating pure functions/ADTs with property tests.
  • Core value: Leverages types as "guard rails" for LLMs, producing reliable code faster than vague prompts, ideal for refactoring state machines.

Details

Key Value
Target Audience FP devs using LLMs for prototypes (e.g., mightybyte: "Haskell's pure functions allow... much stronger guard rails constraining... LLMs")
Core Feature Paste types → LLM generates impl + QuickCheck/JSVerify tests; verifies exhaustiveness, refines iteratively
Tech Stack Haskell (backend), OpenAI/Anthropic APIs, QuickCheck, React (UI)
Difficulty High
Monetization Revenue-ready: Pay-per-use ($0.01/LOC generated)

Notes

  • HN loves LLM+types synergy: Jeff_Brown/ryandv praise type constraints for reasoning; agumonkey wants Haskell shops.
  • Fuels debates on AI-assisted type-driven dev; utility for "boring" CLI/parsers rastrian mentions.

Read Later