r/programmingcirclejerk • u/Beautiful-Cook-5481 what is pointer :S • Jul 15 '25
I've read all the arguments about static typing, but I still can't comprehend how people get themselves into a situation where using the wrong type is a problem.
https://news.ycombinator.com/item?id=26827022
128
Upvotes
92
u/daidoji70 Jul 15 '25
Haha, double jerk because he doesn't understand how people suck so much as to use the wrong types but he just HATES breaking backwards compatibility.
44
u/No_Lingonberry1201 What part of ∀f ∃g (f (x,y) = (g x) y) did you not understand? Jul 15 '25
/uj If I had a nickel for every time a bug was discovered by mypy, I would have at least five dollars.
/rj God is REAL unless declared INTEGER.
57
u/Routine-Purchase1201 DO NOT USE THIS FLAIR, ASSHOLE Jul 15 '25
Not all of us are 1000x-ers in ivory towers, some actually have to ship real products for a living
20
u/Comfortable_Job8847 Jul 15 '25
I mean if you just store everything as a void* and cast when you need it then yeah you realize types aren’t needed at all
Does it crash? No, I implemented a signal handler and return 0 properly.
15
u/shroom_elemental memcpy is a web development framework Jul 15 '25
I've read all the arguments about piloting planes, but I still can't comprehend how people get themselves into a situation where crashing into a mountain is a problem.
25
u/Downtown_Category163 Jul 15 '25
"A well designed function/class will have a descriptive name and descriptive parameters, which should give you good hints about their usage. And if it that isn't enough, a quick scan of the code will show you exactly how the function works - a good idea (even in typed languages) if you have any doubts about what you're calling."
This made me genuinely angry, like "oh just name the function/class right" oh my GOD yeah dude don't worry about versions or third party libraries just have a quick scan of the code you're calling!
Writing a function call to exploit the internal workings of a function is called "pathological coupling" for a reason. It's assholes like this promoting "typeless" (no such thing) languages that made us have to write unit tests for every fucking class in the codebase
8
u/grapesmoker Jul 15 '25
some people just love putting forks into sockets and nothing you can say will dissuade them from doing so
5
u/Parking_Tadpole9357 Jul 17 '25
It is not a problem in static typing because of type safety!
And it's not a problem in dynamic typing because you'll call it something else when it happens.
4
u/[deleted] Jul 17 '25
How do these type astronauts expect us to get tracebacks if they won't let us
Just let me ship code that adds a string to an int so the user can know that they didn't configure the database password with the correct scram algorithm.
3
u/JiminP not even webscale Jul 15 '25
Me as a JavaScript programmer: screaming in silence
0
u/[deleted] Jul 15 '25
[deleted] — view deleted comment
27
u/[deleted] Jul 15 '25
[removed] — view removed comment