Announcement
Collapse
No announcement yet.
DAV1D: A New AV1 Video Decoder From The VideoLAN Developers
Collapse
X
-
Originally posted by Weasel View PostYeah the right way is:Code:void f1(const char*); void f2(const T*); // and so on
Comment
-
Originally posted by oleid View PostSweet, a programing tip from our favourite C troll. But I'm really disappointed. Such high level stuff as typed pointers is retarded. Void* should be enough for a real 1337 h4x0r like you?!?!
Also static typing isn't an abstraction since they literally compile to the same thing and are only useful for compilation purposes, you can cast them anyway if you need something else.
Comment
-
No, the sad part is, that you're dead serious.
Also static typing isn't an abstraction since they literally compile to the same thing and are only useful for compilation purposes.
sure it's an abstraction, albeit zero cost. Like iterators in combination with folds in some programming languages. Or optional data types, which compile down to pointers (null pointer in the none-case). And like most abstractions, they exist to help the programmer and sometimes even the compiler to reason about code.
Comment
-
First time I hear someone say that static typing is an abstraction. Usually, abstraction is supposed to give you less stuff to think about. Static typing is the opposite of that.
But static typing doesn't affect code generation and I don't mean only "cost" here, I mean literally the implementation of the standard library. There's no guarantee two standard libraries have the same implementation (e.g. GCC and Clang). With raw types, it's perfectly fine to mix them in interfaces. So no, it's not the same.
Comment
-
Comment