4 ms·
Indeed. In fact, a strong contender for the absolute worst codebase I've worked on was in Go. No type system is going to save you if you if you don't follow pre
by luord 6y ago
Indeed. In fact, a strong contender for the absolute worst codebase I've worked on was in Go. No type system is going to save you if you if you don't follow pretty much any good practice. Conversely, well modeled systems can be coded in any language, as long as good practices and good communication are continuously enforced.
There are even studies on this and, so far, there's no strong correlation between type system (or paradigm, for that matter) and number of bugs in a codebase.
In fact, one recent study on the matter ended up turning into a flamewar between two different groups of scientists, the ones who first published the study and the ones trying to replicate and double check the data... As discussions on type systems and paradigms are won't to do. Evidently not even academia is safe.
I wish there actually were empirical evidence to support one's preference in that area, if only to get rid of those flamewars that have been going on for decades. Alas, until that happens, what language one prefers mostly remains opinion or personal experience.
- strokirk 6y agoCan you send a link to the study? Sounds interesting!
- luord 6y agoMy favorite summary of the whole thing is here: https://www.hillelwayne.com/post/this-is-how-science-happens/ https://www.hillelwayne.com/post/this-is-how-science-happens... It was shared here a while ago (https://news.ycombinator.com/item?id=22531453 https://news.ycombinator.com/item?id=22531453), if you also want to read the HN discussion about it.
- lmm 6y ago> In fact, a strong contender for the absolute worst codebase I've worked on was in Go. So the most notoriously limited typesystem of the century, the one that ignored decades of progress, lead to a bad codebase? And you see this as an argument against type systems?
- luord 6y agoI don't think I was making any arguments. Furthermore, if there's a takeaway from my comment, is that I don't think there are arguments to be said in that particular discussion, only opinions supported by one's specific experience. There's certainly a dearth of solid empirical evidence one way or the other. I was also agreeing with GP's saying that "static typing won't save us". There are many things to say about Go's type system, but it is definitely more static than Python's, which I've also worked with.
- lmm 6y agoGo-style type systems won't save us, but Go's type system is literally from the early 1950s. It's closer to Python's type system (i.e. unityping - "static type system" is a tautology, the things that Python calls types are not types) than it is to a post-ML type system. Judging the limits of type systems based on Go is like judging the limits of VR based on the Virtual Boy.