Meanwhile, Rust punches you in the face for the mere suggestion. Again. And again.
Python happily nods, runs it one page at a time, very slowly, randomly handing things off to a C person standing to the side, then returns a long poem. You wanted a number.
Assembly does no checking, and reality around you tears from an access violation.
EDIT: Oh, and the CUDA/PyTorch person is holding a vacuum sucking money from your wallet, with a long hose running to Jensen Huang’s kitchen.
Rust just keeps telling me “you didn’t actually learn how references work” over and over
I refuse to believe the python one ever happens. Unless you are importing libraries you don’t understand, and refuse to read the documentation for, I don’t see how a string could magically appear from numeric types.
You don’t see how type mismatch errors can happen in a dynamically-typed language? Then why do they happen all the time? Hell, I literally had a Python CLI tool crash with a
TypeError
last week.That’s not what I’m saying at all. What I’m trying to say is that I can’t think of any way a program working with numeric types could start outputting string types. I could maybe believe a calculator program that disables exceptions could do that, but even then, who would do that?
The point of the joke is not that the Python interpreter will change types mid-program on its own, but that you don’t have any real way of knowing if you’re going to get the type you expect.
Programs are messy and complicated, and data might flow through many different systems before finally being used for output. It can and often does happen that one of those systems does not behave as expected, and you get bugs where one type is expected but another is used in actuality.
Yes, most likely what would happen in Python is a
TypeError
, not actual output, but it was pretty clearly minor hyperbole for the sake of the joke.
Am I bad at programming?
No, it’s the language thats wrong.
Except that many other languages have proven that C++ is simply terrible at providing meaningful errors.
I wish there was something like that for SQL
We can always make a Rust Query Language
This is why I will never touch Javascript again. Long ago when I worked on web stuff, half my workflow was spent in the debugger tracing garbage to find where a typo was. The industry moved to Typescript, and now assuming the strictness checks are enabled, if some Typescript transpiles successfully, I can be 95% sure whatever fuckup I observe at runtime is a logic problem.
Weakly typed languages were an awful idea. But in general, if the compiler isn’t able to detect most runtime issues (like with C++ here), it’s not going to be the most productive language to use for building solutions compared to smarter alternatives.
What surprised me the most was the speed of the compilation, must be a very small program. I tried to compile Godot from source once. Force-stopped it after 3 hours
There’s a reason the play is called waiting for Godot
How many cores do you have and what compiler was it ? Also RAM can help with huge codebases iirc. When I was working with UE5 I had the best Ryzen available with 128 Go of RAM, could compile the engine (which is much bigger than Godot) from source in less than 2 hours iirc (yes that is a full clean+rebuild, not just compiling recent changes)
Ah, C++. An endless supply of footguns where the difference between a junior and a senior dev is knowing what parts of the language to never use.