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?
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...