This is great in concept but what prevents me from using it is TDD. I don't want to waste tokens on producing code that doesn't ship to the end user. Design by Contract is a far superior approach. If you've never heard of Design by Contract I don't blame you, our culture really failed to bring it mainstream. But I swear by it and it gives me real superpowers. Maybe I should fork this and gut the TDD part and replace it.

Nothing about Superpowers forces you to use TDD, brainstorm first, etc. It’s not rigid about the workflow.

What programming language are you using for Design by Contract?

I'd like to know, too!

DbC is an actual superpower. Coupled with a gradual type system, especially one that provides type refinements (not sure if that's a Racket-specific[1] or generic term), DbC covers a wide variety of problems and either eliminates them or makes debugging them a lot easier. The problem is that only two/three languages are built around DbC (Eiffel, Racket, Ada/SPARK). There are a few others (e.g., Clojure, Raku, Scala) that provide some degree of support, but their capabilities are incredibly basic compared to what, for example, Racket offers. And for mainstream programming languages, there are libraries, but it's a coin toss whether authors even understand the idea (I once asked in a ticket for some Python contract library about contracts for callables and was met with "what?" - as if specifying range constraints on ints was all DbC was about).

Unfortunately, Racket is tiny, barely a blip in the training data. In theory, you could probably get agents to a new level of reliability by making them write Racket; in practice, though, you'll burn a lot more tokens on every single edit, because the agent will need to rediscover how to do things in Racket much more often than in Python.

I had some hopes that LLMs and agents based on them would be an opportunity for less popular, but technically advanced languages. So far, it doesn't seem like it's happening; the ridiculous per-token API prices mean that you need a really good agent harness for your language - and what niche PL has resources to focus on building one?

[1] https://docs.racket-lang.org/ts-reference/Experimental_Featu...

[deleted]