Hacker News new | ask | show | jobs
by forgotusername6 18 days ago
I have heard "the poor type safety" argument from writers of strongly typed languages for many many years. Having written js and python for a large amount of my carrier I can count on one hand the number of times I've found a bug that was due to a type issue. With LLMs it has been the same pattern. They don't seem to produce issues with types.
3 comments

> I can count on one hand the number of times I've found a bug that was due to a type issue.

Most bugs aren't type issues until you make them be type issues by expressing some business invariant in types.

Refactoring makes an exception not being caught the same way as before ? Type issue. Mixing up some ids ? Type issue. Etc.

Now that can also be emulated with extensive tests. But isn't that a concern for OP as well ?

well i’ve come across it loads, especially 1/2) during REPL style build outs and 2/2) calling libraries and frameworks you are not yet familiar with.

perl another offender… is it a hash? is it an arrayref? over time you get it right, but by trial and error and looping. json suffers this too, arrays different from strings, different from numbers etc, but opaque until checked and liable to change

There's absolutely no way that's true.
My experience is only anecdotal but I can assure you it is true!
It's easy to talk at cross purposes in discussions like this. There are two implicit claims

* Few bugs occurred due to type issues (which I think you are asserting)

* You can design your program with types so that what would be a bug due to a type issue doesn't compile (which IshKebab may be thinking)

Both of these can be true at once