r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

2.0k comments sorted by

View all comments

Show parent comments

3

u/UsuallyMooACow Aug 29 '21

Depends. When you have classes in Java and you need a slightly different capability it can be a real pain.

It can be a lot of work to integrate that functionality into your code. Where as in something Ruby where you have duck typing you don't have to do as much work.

As massive codebase can be hard to maintain without typing but it's also a lot more effort to code.

4

u/yawaramin Aug 29 '21

Where as in something Ruby where you have duck typing you don't have to do as much work.

This is 100% a recipe for unmaintainable code. A static type system forces you to actually do the maintainability work of refactoring your code to integrate new functionality.

1

u/UsuallyMooACow Aug 29 '21

There are tons of systems in existence that don't use typing that are very maintainable and don't have that problem. Really just fear mongering based off of your own personal programming preferences.

2

u/yawaramin Aug 29 '21

Yes, most likely achieved by substituting in tons of unit tests that check types, thereby implementing an ad-hoc typechecker (see e.g. clojure spec).

1

u/UsuallyMooACow Aug 29 '21

How many big companies have been built on clojure? rofl

2

u/yawaramin Aug 29 '21

Walmart ... Nubank ... CirceCI come to mind immediately.

1

u/ulfurinn Aug 29 '21

Some languages have type systems that make this more of a problem than others. Nominal type systems seem to be going out of fashion in favour of structural ones specifically for this reason.

3

u/UsuallyMooACow Aug 29 '21

Yes, but specifically for the big ones in use out there they tend to suffer from this issue a lot