Earlier quoted context omitted.
> I WOULD have used a NonEmptyString type for the deserialized result of the response body. That's... pretty much my whole freaking point here Huh, you rambled about not being able to do so. But now you claim it's totally feasible if you wrote it? It seems you're just ranting against bad programmers instead of missing language features then.
I believe you're being disingenuous. I'm rambling because our programming languages make it awkward, difficult, and performance-sub-optimal to do such things. If you do what I often do, you have to wrap and unwrap your primitives explicitly so that you can use APIs that others have written. You take a performance hit with all of the boxing and unboxing. It's absolutely still a missing language feature if the language…
It's just that you seem make a bigger fuss out of the problem than it actually is. Even with Java, there's boilerplate and some performance cost, but it's doable, and the real reason people don't do it (when they should) is because they underestimate the risk of making mistakes. (eg. Nobody uses JSON if the requirement is to squeeze out every single ounce of performance from the CPU, there are better binary protocols.)
Maybe it's indeed Stockholm syndrome, but I don't really see it as a problem of the "world at large". The tech is there, it's easily and freely available. Of course there's trade off between popularity and technical superiority, as always, but there's really nothing preventing you from writing Rust or TypeScript right now, if you feel strongly enough about it. So your job requires you to use a 3 decade old language? You can always change jobs or start your own thing using new tech. I mean, I'm using these 3-decades-old languages at work but at least I know it's a choice I make in exchange for decent pay and a stable job. Complaining about the lack of adoption of new tech (or coworkers not utilizing the type checking system properly) and then not taking proactive steps to fix the problem seems a tad bit hypocritical to me... The reason the world has not caught on with better tech is precisely due to the same reasons that you're not using it in the first place.