Full podcast episode: th-cam.com/video/-DVyjdw4t9I/w-d-xo.html Lex Fridman podcast channel: th-cam.com/users/lexfridman Guest bio: Guido van Rossum is the creator of Python programming language.
I come from C++ as well and have to say that the type hinting is a big help. Writing the code base I'm making right now would've been a nightmare without it.
You could also sometimes develop your application while its still running (like have a part of your program run in the Jupyter lab reactive notebooks).
There's cases where dynamic typing is more advantageous - certain applications, or just something simple to bang out. In any real sizable codebase, the dynamic typing of a whole language is a huge drawback and developers spend tonnes of time dealing with it, unless it's specific to that implementation (meta programming)
Yeah, developing apps while they are still running could help with many types of errors and working with APIs, another thing is keyword arguments. Static analysis like type inference and dynamic analysis could also help with code discovery.
Pyrite is often referred to as “fool’s gold”, and I sense a slightly self-deprecating or ironic aspect in the choice to reference it. So I reckon there’s an extra level of wordplay going on in the naming of Pyright that acknowledges it’ll never perfectly allow you to have both total flexibility and correctness.
@@OneDivineShot the insight comes somewhat second hand from one of my university lecturers years ago, referring to another project of a similar name. In that case, it was to do with embedding code (SuperCollider IIRC) in a visual dataflow environment (Max/MSP).
I only switched to python until I figure out there is type hint. During pre type hint era, I would literally be ap frustrated whenever I see type error. I would just think fuck me, I have been coding cpp for so long and you're telling me I don't know the basic about data type!?
But fixing the max size of the variable using some extra syntax for writing some programmes might help. The interpreter would know the size of the variable thus it could be performing special optimizations accordingly.
Python compiles itself into python byte code.. so we could totally have the python "interpreter" check our types at compile time and not suffer a performance penalty....
The linguistic of a processor has come so far from the model of the analytical engine to the computer scientist that creating a way to change data within the computer rather than keeping the physical concept of the ENIAC alive. Ada Lovelace and Charles Babagge would be happy. Regardless, I am still learning but wouldn't the architect notify the team that is caparmentalized in th regard of the static checker or is the static checker a purchasable tool utilized for the testing. (Architecture) Prerequisites, requirements, construction, testing.
@@SplitWasTaken I'm still learning but a static checker is used for analyst of the program before compiling to alert developers in order to save time and money.
@@isodoubIetit's not that bad, you just use a separate program to enforce them, python doesn't have a separate compilation step, so you'd be typechecking your whole program each time you run it
@@fgaze1234 Because in that case they can lie. They're comments, for all intents and purposes, but unlike comments they _seem_ like they mean something and offer a kind of security that really does not exist.
@@biskitpagla There is probably a big overlap, don't think all devs only consume formal stuff, I even classify myself as one, using Arch, i3, being constantly in the terminal etc and don't mind watching some of his videos for fun, the guy also had multiple people considered as elite in their (non bs) field as guests
Strictly typed languages are only useful in data scheme based programs. That is, programs that somehow are compromised to real information and have to preserve it's integrity. In most cases, Strictly typed languages are not necessary since the data tends to be raw computational resources.
Full podcast episode: th-cam.com/video/-DVyjdw4t9I/w-d-xo.html
Lex Fridman podcast channel: th-cam.com/users/lexfridman
Guest bio: Guido van Rossum is the creator of Python programming language.
My go tos are:
- Mypy/pyright for static type checking
- Pydantic for dynamic type validation
- mypyc for compilation optimization using type hints
also typeguard for validation of non pydantic.BaseModel entities
I come from C++ as well and have to say that the type hinting is a big help. Writing the code base I'm making right now would've been a nightmare without it.
IDE suggestions also improve greatly when you define parameters types of a function
@@misterwafflezzz Indeed. I'll never write a library without them anymore.
You could also sometimes develop your application while its still running (like have a part of your program run in the Jupyter lab reactive notebooks).
or you could just stick with cpp😂
@@ansismaleckis1296 If I could, I would 😅
There's cases where dynamic typing is more advantageous - certain applications, or just something simple to bang out.
In any real sizable codebase, the dynamic typing of a whole language is a huge drawback and developers spend tonnes of time dealing with it, unless it's specific to that implementation (meta programming)
ObjC has pretty dynamic typing and it works great for large codebases
Yeah, developing apps while they are still running could help with many types of errors and working with APIs, another thing is keyword arguments. Static analysis like type inference and dynamic analysis could also help with code discovery.
Pyrite is often referred to as “fool’s gold”, and I sense a slightly self-deprecating or ironic aspect in the choice to reference it. So I reckon there’s an extra level of wordplay going on in the naming of Pyright that acknowledges it’ll never perfectly allow you to have both total flexibility and correctness.
This is a very interesting statement and thank you for sharing.
@@OneDivineShot the insight comes somewhat second hand from one of my university lecturers years ago, referring to another project of a similar name. In that case, it was to do with embedding code (SuperCollider IIRC) in a visual dataflow environment (Max/MSP).
Thank you so very much LEX😎🙏⭐
Why are they not discussing cython?
I just wish we didn't have TWO tools.. there's both mypy and pyright/pylance... and the errors you get from each one can be different.
I'm really glad we do. Because they've both been elevating each other a lot.
I only switched to python until I figure out there is type hint. During pre type hint era, I would literally be ap frustrated whenever I see type error. I would just think fuck me, I have been coding cpp for so long and you're telling me I don't know the basic about data type!?
But fixing the max size of the variable using some extra syntax for writing some programmes might help. The interpreter would know the size of the variable thus it could be performing special optimizations accordingly.
mypy for typechecking, pyright for lsp
Pydantic can do it if I am not mistaken
less than & greater than are not angular brackets
Lex Freeman look like and act like T-1000 Terminator Robot.
This sentence looks like it was typed by a T-1000 Terminator Robot.
Seriously. He sounds so sedated almost programmed like a robot!
Pydantic - a great package using annotations
It uses annotation to check it's variable types as well?
@@dingding4898 Yup. You can use Pydantic for all kinds of validation. But it's nothing like a real type system if that's what you're looking for.
@@dingding4898 not really ! Pydantic is more about parsing than validating , and parsing is alway better.
Python compiles itself into python byte code.. so we could totally have the python "interpreter" check our types at compile time and not suffer a performance penalty....
The linguistic of a processor has come so far from the model of the analytical engine to the computer scientist that creating a way to change data within the computer rather than keeping the physical concept of the ENIAC alive. Ada Lovelace and Charles Babagge would be happy. Regardless, I am still learning but wouldn't the architect notify the team that is caparmentalized in th regard of the static checker or is the static checker a purchasable tool utilized for the testing. (Architecture) Prerequisites, requirements, construction, testing.
wut?
@@Gruuvin1 They're drunk
Are you right in the head?
@@SplitWasTaken what do you mean?
@@SplitWasTaken I'm still learning but a static checker is used for analyst of the program before compiling to alert developers in order to save time and money.
Love from Nepal
My disappointment was immeasurable when I found out that Python type hints are not actually enforced by the interpreter, and my day was ruined.
I know, I wish we at least had an option.. like `python --type-check` or something
That fact alone makes them worse than useless IMO.
@@isodoubIetit's not that bad, you just use a separate program to enforce them, python doesn't have a separate compilation step, so you'd be typechecking your whole program each time you run it
@@isodoubIet Why?
@@fgaze1234 Because in that case they can lie. They're comments, for all intents and purposes, but unlike comments they _seem_ like they mean something and offer a kind of security that really does not exist.
Only men of culture watch technical interviews with Guido van Rossum. The rest will watch Joe Rogan.
😂😂❤
Nonsense. We watch both.
What's wrong with both?
This lack of overlap probably has more to do with being failed by the US's education policies than being men of culture or whatever that means.
@@biskitpagla There is probably a big overlap, don't think all devs only consume formal stuff, I even classify myself as one, using Arch, i3, being constantly in the terminal etc and don't mind watching some of his videos for fun, the guy also had multiple people considered as elite in their (non bs) field as guests
Rust
Hi!
Strictly typed languages are only useful in data scheme based programs. That is, programs that somehow are compromised to real information and have to preserve it's integrity. In most cases, Strictly typed languages are not necessary since the data tends to be raw computational resources.