← Back to context

Comment by jaapz

2 months ago

Have you actually used this in a real codebase? Because it is the opposite of my experience in gradually adding types to a large python codebase. There's no extra complexity or slower development. It's not like you need to suddenly move to a different coding paradigm with FactoryBeanFactoryBeans... You just keep writing python like you did, but add types here and there to help clarify things and make your LSP (like ty) work better.

If anything, it speeds up development. Plus it helps give more confidence in the correctness of your code.

Yep, the software development slows down to crawl. Yes, you can still code at the same speed as you were coding in a language like Java or C# but that is considerably slower then what's possible in languages like Ruby and Python.

To give you a roughly idea, you should always expect a 3x slow down when using static typing.

An recent example is Turborepo that went from basic types in Go to proper static typing in Rust. Just adding in the proper typing caused the codebase to grow from 20,000 lines to 80,000 lines and from 3 developer months to 14 developer months.

The stronger your typing system, the slower you will develop code. Whether you realise it or not.