top | item 34294185

(no title)

fmntf | 3 years ago

Think of the Linux kernel. That's a huge project, organized in an object oriented fashion. Is there a difference between this->method(arg) and method(this, arg)?

discuss

order

hot_gril|3 years ago

It'd be more like typename_method(this, arg, &err) in C because there are no namespaces or exceptions. Also you'll have to manually call destructors.

So yeah, it works fine, just more verbose cause it lacks some syntactic sugar. I prefer C for simple or high-performance programs, and I can see why people might want C++ for larger ones. Problem is some people make a mess pulling out all the stops in C++ OOP features.