A Philosophy of Software Design

Walter Bright newshound2 at digitalmars.com
Mon May 25 05:55:59 UTC 2026


On 5/24/2026 6:13 AM, Lance Bachmeier wrote:
> I haven't read that book, but Ousterhout has made the same point elsewhere for 
> years, and I've never grasped the practical side of his argument. It would be 
> nice to do, but it's a necessary part of a working program.

You are correct that it is not necessary. However, I recognize a number of 
complexity-reducing techniques I use that are in the book.


> There's a solution to this. I have the LLM program in a "new language" and 
> upload the spec with some examples. No global state. A maximum of 60 lines in 
> the body of a function. A maximum of 10 function arguments. No code blocks. Only 
> goto for jumping around inside the function. You need to change the syntax to 
> get it to accept that you have a new language, so I require line numbers at the 
> start of every line.
> 
> The problem with just telling the LLM to write a D program that does such and 
> such without restrictions is that it wasn't trained to impose constraints like 
> this to keep the complexity under control, and there's no way it can work well 
> with the amount of context that's required to write a program that can easily be 
> modified in the future.

I agree with no global state, however, the 60 line limit is arbitrary. 
Complexity comes from how much state you need to keep in your head, not how many 
lines of code.


More information about the Digitalmars-d mailing list