News for hackers. Stuff that matters.
Re:Ruff: Python linter and code formatter written in Rust by pansa2 on Tuesday January 21, 2025 @02:37AM (#42777474)
> I've never found myself wanting a type checker

Do you still write type hints, but not check them? Or just use dynamic typing as in Python 2?

Actually, I guess the first case is really type-hints-as-comments, so isn't substantially different from the second.

> I've been using Python for right about 20 years now

Either way, I've found it quite common among long-time Python users to stick with Python's traditional dynamic typing, whereas newcomers to the language tend to really dislike it in favour of strict static typing. (One exception is GvR himself, who seems to be very pro-type-checking.)

As the second group continue to add increasingly complex typing features to the language, I wonder if Python is becoming less desirable for those in the first group.

Re:Ruff: Python linter and code formatter written in Rust by zahlman on Tuesday January 21, 2025 @08:03AM (#42779646)
>Do you still write type hints, but not check them? Or just use dynamic typing

I occasionally write them as a form of documentation - when it would be more concise than explaining in prose.

There is nothing specifically 2.x-style about making use of dynamic typing - it's a core property of the language. While 3.0 introduced the annotation feature, it wasn't even specifically intended for typing (https://peps.python.org/pep-3107/) and standard library support wasn't added until 3.5 (https://docs.python.org/3/library/typing.html).

>As the second group continue to add increasingly complex typing features to the language, I wonder if Python is becoming less desirable for those in the first group.

Some new changes have been missteps, in my view. There's still nobody forcing my hand when it comes to typing, really; I just shake my head when I see people trying to make it do things it really wasn't designed for. On the other hand, there are definitely things I'd love to see improved about the language.

Re:Ruff: Python linter and code formatter written in Rust by vram22 on Tuesday January 21, 2025 @04:05PM (#42785189)
What new changes do you think have been missteps?
Re:Ruff: Python linter and code formatter written in Rust by zahlman on Wednesday January 22, 2025 @04:10AM (#42790719)
Mmh - that's difficult. I should dedicate a blog article to that topic. Probably can't get to it until next month, though.