2 ms·
C has void pointers.
by paulddraper 10mo ago
C has void pointers.
- lelanthran 10mo ago> C has void pointers. And? Void pointers are not the default type :-/ With Python I have to do extra work to get type errors. With C I have to do extra work to hide the type errors. I am battling to understand the point you are making.
- baq 10mo agoHard to argue with an argument which isn’t internally coherent.
- array_key_first 10mo agoHe's probably conflating static and strong typing. C is statically typed, but weakly typed - you need to throw away types to do a bunch of run of the mill things. Python is dynamically typed, but strongly typed, where it will just fail if typed don't resolve. C# and C++ are both statically typed and strongly typed, although C# more than C++ in practice.
- paulddraper 10mo agoI believe that is in fact the exact return type of malloc. You have to do extra work to type it. I’m not aware of any other statically typed language that does that. Hopefully that helps you in your battle.
- lelanthran 10mo ago> I believe that is in fact the exact return type of malloc. > You have to do extra work to type it. Nope. Casting the return from `malloc` is a code-smell in C. You have to do extra work if you use `malloc` in C++. > Hopefully that helps you in your battle. Not sure what you mean by this - weren't you the one who dragged C into a conversation about Python?