Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why do I still use C?

Name: Anonymous 2009-04-28 15:39

Sepples has good performance, good portability, a lot of libs and OOP is a lot cleaner than LOL STRUCT ****POINTER 0x000000f HAX
But still, I like writing programs in old C. Who fucking needs OOP and shit? Sepples is for whores and code monkeys who spend their time reading Design Patterns: Elements of Reusable Object-Oriented Software and XKCD, using useless shit like Singletons ( LOL, stupid ass waste of code, who the fuck seriously needs them? ). And no garbage collecting, great "language of the future". It's still better than C#, Java and other heavyweight shit anyway.

Name: Anonymous 2009-04-28 21:14

>>5
Enjoy your misnamed global variables. With factories.

OP: you can do OOP with C, quite easily in fact. Hint: think along the lines of #define method(x, y, ...) x->y(x, ...). You MIGHT even be able to name it $, if you happen to like line noise. Then just make a few new_whatever functions, and you're writing C++-- without the useless overhead of requiring a C++ compiler.

Name: Anonymous 2009-04-28 21:21

>>6
I've tried doing OOP in C the other month and it was quite simple to do with macros, but it can get a bit uglier if you use virtual functions, as you'll have to write something like:
ObjInstance->vTable->method(...), which you could declare another macro to make the call cleaner, but you still end up accumulating a bunch of boilerplate code.

A better alternative might be to just think OO where needed and just make a few functions which operate on structures as you would do with objects, then export that interface in your header file and it will look cleaner and work almost as well.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List