4 ms·
Basedpyright is not rust but it's a fork of pyright with added features that are otherwise locked in vscode
by jerrygenser 1y ago
Basedpyright is not rust but it's a fork of pyright with added features that are otherwise locked in vscode
- f311a 1y agoIt's written in Typescript, which is a super weird choice.
- huflungdung 1y ago[dead]
- wiseowise 1y agoWasn’t pyright made specifically for VSCode? That would explain TS.
- f311a 1y agoYes, but why they did not write it in a compiled language? Pyright is pretty slow in large code bases and takes a lot of RAM. Javascript can be faster than python in some cases, but Python is so easily extendable with C,C++, Cython, Rust. They could use Python with one of the compiled language.
- IshKebab 1y agoBecause they wanted it to be usable on the web, and I guess WASM wasn't where it is right now when they started.
- drcongo 1y agoIt's also horrible for fasle positives unless your project happens to be the exact same setup as the maintainers' - I had to turn off the actual type checking on it. I've since moved wholesale to the Ty alpha and it feels a hell of a lot smarter.
- JimDabell 1y agoIt also inherits the unfortunate attitude of Pyright that it will warn against idiomatic Python (EAFP) in favour of non-idiomatic Python (LBYL): https://github.com/microsoft/pyright/issues/1739 https://github.com/microsoft/pyright/issues/1739 https://docs.python.org/3/glossary.html#term-EAFP https://docs.python.org/3/glossary.html#term-EAFP https://docs.python.org/3/glossary.html#term-LBYL https://docs.python.org/3/glossary.html#term-LBYL
- kstrauser 1y agoEww, what? I hadn’t seen that before. Yikes, I hope the situation’s improved. I’d be butting into that continually.
- deleted 1y ago[deleted]
- maleldil 1y agoSometimes dynamic Python idioms are incompatible with typed Python. I personally think that's fine, since I consider static typing a significant improvement overall.
- JimDabell 1y agoThis isn’t. They actually fixed that bug. Then they changed their minds and backed the fix back out again because they don’t think you should write Python that way: > I think EAFP is a very unfortunate and ill-advised practice. They want you to not write the idiomatic Python: try: foo = bar["baz"]["qux"] ... except KeyError: ... …and instead write the non-idiomatic version: if "baz" in bar and "qux" in bar["baz"]: foo = bar["baz"]["qux"] ... else: ... If this were a linter then I would accept that it is going to be opinionated. But this is not a linter, it’s a type checker. Their opinions about EAFP are irrelevant. That’s idiomatic Python.
- IshKebab 1y ago
- jon-wood 1y agoI'm sorry, I can't take seriously any piece of software which decided to prefix the previous version's name with "based". I'm aware this is a me problem.
- cruffle_duffle 1y agoHah. I love the name. It implies that whatever the original “pyright” was doing wasn’t keepin’ it real. This new version, it’s “based” so it must be somehow more “real” and “grounded” and “legit”. All I know is it is much more strict about stuff than pylance was. Also a me problem!
- wiseowise 1y agoDefinitely this. I commend author of BPyright, but clown (?) avatar, unknown identity of maintainer, and name of the fork rub me off wrong way.