Python's type system explained: Static vs dynamic typing | Guido van Rossum and Lex Fridman

Python's type system explained: Static vs dynamic typing | Guido van Rossum and Lex Fridman

Lex Clips

1 год назад

52,615 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@avasam06
@avasam06 - 02.12.2023 09:06

My go tos are:
- Mypy/pyright for static type checking
- Pydantic for dynamic type validation
- mypyc for compilation optimization using type hints

Ответить
@laughingvampire7555
@laughingvampire7555 - 02.06.2023 06:45

less than & greater than are not angular brackets

Ответить
@indibarsarkar3936
@indibarsarkar3936 - 12.03.2023 16:02

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.

Ответить
@runners4tme
@runners4tme - 11.01.2023 17:36

Pydantic can do it if I am not mistaken

Ответить
@dave_di
@dave_di - 22.12.2022 18:39

Only men of culture watch technical interviews with Guido van Rossum. The rest will watch Joe Rogan.

Ответить
@KoRNeRd
@KoRNeRd - 22.12.2022 09:08

Why are they not discussing cython?

Ответить
@muzam1l
@muzam1l - 11.12.2022 01:31

This guy's been making wrong decisions all his life! JUST USE TYPES AT RUNTIME (NOT CHECK) TO GENERATE FASTER BINARIES AND USE FUCKIN ANGULAR BRACKETS FOR TYPE GENERICS.

Ответить
@xinaesthetic
@xinaesthetic - 10.12.2022 15:36

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.

Ответить
@augusto256
@augusto256 - 10.12.2022 02:03

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.

Ответить
@andrewburger8808
@andrewburger8808 - 03.12.2022 22:35

Rust

Ответить
@hung-tienhuang3640
@hung-tienhuang3640 - 03.12.2022 05:52

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!?

Ответить
@echobucket
@echobucket - 30.11.2022 06:09

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....

Ответить
@echobucket
@echobucket - 30.11.2022 06:04

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.

Ответить
@tripletth
@tripletth - 29.11.2022 00:00

My disappointment was immeasurable when I found out that Python type hints are not actually enforced by the interpreter, and my day was ruined.

Ответить
@bunpasi
@bunpasi - 28.11.2022 16:27

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.

Ответить
@TheMcl0ud
@TheMcl0ud - 28.11.2022 13:49

Pydantic - a great package using annotations

Ответить
@shvsagar
@shvsagar - 28.11.2022 08:40

Love from Nepal

Ответить
@andreipiv
@andreipiv - 28.11.2022 07:49

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)

Ответить
@kainoapaishon3188
@kainoapaishon3188 - 28.11.2022 07:34

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.

Ответить
@rustamazimov8497
@rustamazimov8497 - 28.11.2022 06:49

Lex Freeman look like and act like T-1000 Terminator Robot.

Ответить
@john.dvollins6284
@john.dvollins6284 - 28.11.2022 06:07

Thank you so very much LEX😎🙏⭐

Ответить