logoalt Hacker News

zahlmanyesterday at 8:15 PM4 repliesview on HN

> My biggest problem with the whole static typing trend is that it makes developers feel empowered to break backwards compatibility when it would be trivial to keep things working.

I don't see the connection you're drawing here.


Replies

eyelidlessnessyesterday at 8:59 PM

Disclaimer: I’m a strong advocate for static typing.

I absolutely see the connection. One of the advantages of static typing is that it makes a lot of refactoring trivial (or much more than it would be otherwise). One of the side effects of making anything more trivial is that people will be more inclined to do it, without thinking as much about the consequences. It shouldn’t be a surprise that, absent other safeguards to discourage it, people will translate trivial refactoring into unexpected breaking changes.

Moreover, they may do this consciously, on the basis that “it was trivial for me to refactor, it should be trivial to adapt downstream.” I’ll even admit to making exactly that judgment call, in exactly those terms. Granted I’m much less cavalier about it when the breaking changes affect people I don’t interface with on a regular basis. But I’m much less cavalier about that sort of impact across the board than I’ve observed in many of my peers.

ljmyesterday at 8:32 PM

Rather, static typing empowers backwards compatibility, right?

Because it lays out the contract you have to meet on the interface. No contract? No enforced compatibility.

show 2 replies
layer8yesterday at 9:03 PM

I could see some maintainers being encouraged by static typing to introduce breaking changes, as long as the changes ensure compile-time breakage. However, that’s only an option in languages without dynamic linking. So it’s the combination of static typing and static linking that would encourage that.

anonymarstoday at 12:07 AM

Indeed. C# is statically typed. Python is not. Which is the one with a notorious backwards-incompatibility story?

show 2 replies