- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
Fr, though, duck typing in Python is one of my biggest annoyances.
I love duck typing! dynamic typing is my issue…
“Assume it’s a map and treat like a map and then catch the type error if it’s not.” Paraphrased from actual advice by Guido on how you should write Python. Python isn’t a bad language but the philosophy that comes along with it is so fucked.
This is just preferring runtime validation instead of compile time validation.
And relying on runtime validation is a horrific way to write production code
Why though? I’ve genuinely never had a problem with it. If something is wrong, it was always going to be wrong. Why is it preferable to have to write a bunch of bolierplate than just deal with the stacktrace when you do encounter a type error?
It’s documentation. I’m a strickler to type in python so later when I look at my code and go what does this do it’s easier.
Time to rewrite the world in assembly
Python with type hints and mypy and ruff = <3
Large Python codebase without types = nightmare
I’m too lazy to insert the “look what they need to mimic a fraction of our power” meme here, so… Please imagine it instead.
I’m switching jobs in a couple of months, and I am SO glad to be leaving a (very well maintained!!) python codebase with type hints and mypy for a rust codebase.
It is just not the same.
Nice! I’d love to use Rust at work, I was a Haskell guy for hobby things, rather recently switched to Rust for that, and I enjoy it a lot. Taking 80% of the good lessons from functional programming while staying performant and practical and just have nice tooling - whoever designed Rust are wise people who know what is important for happy developers.
My job is mainly C++, and if you have seen the bright side of life, it is difficult not to be frustrated by the language and tooling. I think C++ without clang-tidy is almost as horrible as Python without types and linters. Undefined behavior and foot guns everywhere!
When I learned Python I thought that not having a statically typed language was the way to go, but then it just became an issue when I was trying to ensure that everything was at least something like what I was expecting. Going back to statically typed languages even harder with Rust has been a dream. I love it.
Eh, strict typing makes debugging way, way easier. Saint Grace brought us compilers for a reason. If all you have is assembly, you should start writing one.
let comment: String = String::from(“lol”);
println!(“{}”, comment);println!("{comment}");
C’mon, it’s 2025!
I was actually tempted to try learning nasm for funsies a year or two ago until I discovered it doesn’t support ARM processors 🥲
Assembly languages are always architecture specific. Thats kind of their defining feature. Assembly is readable machine code.
nasm
is an assembler though, not a ‘languages’, that only supportsx86/x64
.gas
for example supports a wide range of architectures so you can writerisc-v
,arm
,x64
, etc.The reason I used the nasm logo is because Assembly itself doesn’t have a logo since it’s not really one language. This is the one I’m with the most familiar with so that’s the one I used. This meme would apply to any Assembly language.
Data types do matter, and someone’s got to declare them at some point, or else your compiler won’t know how to intepret them. It’s just a question of who should be doing the declaring: you, or a parser algorithm? Personally, I don’t like things being done for me.