Why static analysis is the way to go

monkyyy crazymonkyyy at gmail.com
Thu May 28 23:38:05 UTC 2026


On Thursday, 28 May 2026 at 22:58:33 UTC, H. S. Teoh wrote:
> 
> Remember, string = immutable(char)[].  That "tiny" decision to 
> stick "immutable" on it is what makes D strings so 
> straightforward to use.

I cast that away anytime it gets in my way, the biggest thing is 
that the os is picky about me modifying strings from the 
executable, the run time couldve just handled that case and 
char[] wouldve been better for me

>
> Remember back in the day when somebody had the bright idea to 
> make AA's more "user-friendly" by allowing const or even 
> mutable arrays as keys?

no I dont, lets allow mutable keys :)

> The  *idea* of ranges elevated our thinking to a whole 'nother 
> level,

the *type theory* of iterators; steponov was probaly being too 
mathy when he defined it and aa copied the hierarchy from stl. 
But it was a bunch of uml boxes and thinking about some variants 
of linked lists and he was trying to imagine what could be made 
to work with c++ operator overloading.

Its definitions from operations, quite explicitly, and steponov 
fairly clear about how he was thinking about it in his rants.

And yet it still has flaws as Ive tried to explain, there is the 
footgun around indexing. Which is still a type theory error.

> Besides, segfaults are only a tiny part of what D eliminates by 
> design.

**But you linked a pro-rust article and called for static 
analyis**, and rusts solution to memory management is to make a 
proof engine. And like no, no, just no. Poor little rikki here 
thinks d needs some math prover thing, rust is such a bad 
influence ;__;

If you let them say shit theyll rewrite history that rust should 
replace all other languages, lets waste 10000x programmer time to 
make the bower checker happy citing perfect mathematical safety.

A focus on api design is just a very very different thing from 
letting safetyphiles masturbate about writing logic engines in 
the middle of your programming language. ` static analysis` 
necessarily implies the latter to me, while good api's mostly 
exist on a lib level(d's runtime being big being a separate 
debate) and it has to survive being taught too people. *You'll 
repeat the @live mistake several times* if you confuse the two.


More information about the Digitalmars-d mailing list