@ado

My fear is that this type hinting pushes #python down the same bad road as #cpp:

Making an originally nice programming language more and more complex and ugly by giving in to the pressure of adding more and more features which don't fit into the original idea of the programming language.

In my view, the core philosophy of #python is that it is a high-level dynamically typed language . And the core philosophy of #cpp is that it is a low-level statically typed language.

Don't mix that.

@folkerschamel @ado

But you don't have to use type hints at all, even in the latest versions. They're completely optional. You could write an entire new application without a single type hint in it, and it would work just fine. Static linters like mypy wouldn't be able to find as many problems without the hints, but that's a tradeoff.

Or does it somehow bother you when some #dependency has type hints in its code?

@cazabon @ado

No, dependencies have their own coding styles (and often different programming languages) anyway and that's perfectly fine.

But "it's only optional" is an excellent excuse for messing with perfect simplicity and elegance.🙃

#python

@folkerschamel @ado

I get it; I've been a big fan of Python since 1995. When type hints were first proposed it did seem a little at odds with Python philosophy - but I was reassured by the immediate assurances that they were optional, and were going to stay optional. So I mostly ignored them for a few years.

When I did start using them, it felt a little weird; the code didn't "look" right. But that's the same with any change.

Now I'm a big believer. They have prevented so many bugs...

@cazabon @ado

Do you have representative specific samples of bugs you found that way? Trivial bugs or nasty bugs, dangerous skeletons in the closet? Could automated tests have caught them, too?

Did you consider switching from #python to statically typed languages like #java, #rust or #golang ?

There was a time when I couldn't imagine in the world to use a dynamically typed language for serious programming. I changed my view completely. B
May be the same with type hints. But maybe not.😉

@folkerschamel @cazabon @ado IMO, the even if it didn't find bugs (which it does), it helps build confidence in the changes you're making. And any junior dev can throw code against the wall; much of what we do as we climb the ladder is building confidence in the code (or rather helping the junior devs build confidence in the code). (see also: Pirsig's ideas about quality)

To answer the other part of your question: Yes, I'm a big fan of Go. I don't know Rust yet, but I'd probably like it too.

@lukeshu @cazabon @ado

Doesn't testing include type issues and build confidence in your code even more?