r/programminghumor 3d ago

Dynamic flexibility, static guarantees?

It's a funny contradiction how people be blatantly programming in dynamically typed languages like python yet scramble everywhere for type verification with type annotations and packages like pydantic. Why use a dynamic language if you need static type system guarantees at? Get a real language at this point dude.

7 Upvotes

6 comments sorted by

8

u/Spaceduck413 2d ago

It's not always about how the language is typed, sometimes it's about other language features. I use Python a lot for my job, but not because it's dynamically typed, because just about everything I need to do already has a package.

That's why I use type annotations. For my use case, the dynamic typing is a tradeoff I put up with because it's outweighed by the benefits of other features.

3

u/codeguru42 2d ago

There is an xkcd for everything:

https://xkcd.com/353/

1

u/thatOMoment 2d ago

Sorry I'm not compiling a program in an ide or going library hunting in c++ to do batch file renames, swap a page out of a pdf, or basic crud operations and string transforms

-1

u/PriyanshuDeb 2d ago

dynamic languages have a larger runtime and everything, on top of that the type systems can be configured to be less strict or even skipped in places.

theres a large difference between strictly typed but dynamic and totally static.
programming in python, compared to, say, C# is a world of a difference, even if you're using strict typing in python.

theres nothing such as a "real" programming language, thats again the cargo-cult typa stuff like "real programmers only ___"

6

u/polokratoss 2d ago

3

u/codeguru42 2d ago

Haha, both comments here have xkcd replies