Email or username:

Password:

Forgot your password?
­

I've made a silly meme base on my struggles over the last month 🥲

#rust #python #rustlang

3 comments
bent

@bemyak I don't understand, are you saying that Rust has a bunch of built-in libraries that you have to source in another language?

Because this is the exact opposite of true

­

@shram86 No, all the mentioned tools and libraries are Python-specific. They are commonly used to provide some sort of type information/hints/validation. And the sad truth is that none of them work well enough (for me) to actually start relying on them.

Typeshed is a repo, which collects interface definitions for most popular libraries (they are imprecise)

mypy subgen can generate type definitions by analyzing program at runtime, crashes on half of my python packages in inspect mode.

Pylance is a Microsoft proprietary language server, which has two modes: "basic" (which catches nothing) and "strict" (which nags you about everything)

Pyright is the open-source part of Pylance, which can only complain, but not fix the come (e.g., no auto-imports)

Basedpyright is a for of pyrigh, because maintainers close issues without a good reason and behave poorly

ruff is a new LSP in Rust, which is fast and gives slightly less false-positives, but still functionality is lacking

pydantic is an attempt to provide something like dataclasses for python with validation and easy (de)serialization, which works really well, but adoption in the ecosystem is poor

collections.abc and typing are parts of the standard library for defining types, adoption is also lacking

And I guess there are tons and tons of projects like this, the list is not nearly excessive. Yet, you can't know reliably what the function arguments are while not paining all code in red. You can't use extremely common libraries like SQL Alchemy with linters in strict mode, WTF?

@shram86 No, all the mentioned tools and libraries are Python-specific. They are commonly used to provide some sort of type information/hints/validation. And the sad truth is that none of them work well enough (for me) to actually start relying on them.

Typeshed is a repo, which collects interface definitions for most popular libraries (they are imprecise)

Go Up