News for hackers. Stuff that matters.
Re:Object-Oriented Programming in C (2019) [pdf] by ku-man on Sunday September 05, 2021 @02:01AM (#28421940)
"If you need to do OOP in C, it's time to move to a more powerful language."

As long as is not C++...

Re:Object-Oriented Programming in C (2019) [pdf] by Subsentient on Sunday September 05, 2021 @02:05AM (#28421956)
C++ has plenty of issues, but it's really not that bad, especially modern C++. It's a huge language with tons of features, many of which you'll never use, but as far as writing C++, really not that bad. I've written a lot of C++ over the years, and I've also written a lot of vanilla C. I can tell you that you can definitely get a new project up and running much faster in C++ than in C.
Re:Object-Oriented Programming in C (2019) [pdf] by LAC-Tech on Sunday September 05, 2021 @02:08AM (#28421965)
I'm an OO programmer, and I avoid using classes in C++. The happy path seems to be to treat at C with STL + smart pointers, not C with classes.
Re:Object-Oriented Programming in C (2019) [pdf] by ahartmetz on Sunday September 05, 2021 @11:16AM (#28424943)
About OO: Bundling data and behavior is a fine technique in some situations, nothing wrong with it. Sometimes, even inheritance makes sense.
Re:Object-Oriented Programming in C (2019) [pdf] by ncmncm on Sunday September 05, 2021 @04:48AM (#28422582)
If you are not using classes, you are not using OO at all, by definition.

That does necessarily not mean you are programming badly, although you might be. But restricting yourself to STL and smart pointers does very strongly resemble Java Disease. You might as well switch to Java.

Re:Object-Oriented Programming in C (2019) [pdf] by pjmlp on Sunday September 05, 2021 @06:01AM (#28422917)
Definition by whom, certainly not by CS and the innumerous SIGPLAN papers and variations on what OOP means since Simula came into the world.
Re:Object-Oriented Programming in C (2019) [pdf] by pjmlp on Sunday September 05, 2021 @06:01AM (#28422920)
STL has plenty of OOP concepts.
Re:Object-Oriented Programming in C (2019) [pdf] by gefhfff on Sunday September 05, 2021 @04:13AM (#28422440)
It is not that bad... Compared to c

Throwing Rust into the pool

Re:Object-Oriented Programming in C (2019) [pdf] by Subsentient on Sunday September 05, 2021 @03:57PM (#28427249)
I write Rust too. I like Rust for the mostpart, though there's some issues with the language that really wind me up, mostly to do with the unsafe/safe code boundary.

If you want full control and easier interfacing with the OS, C++ is probably a little better, but Rust is definitely a little easier to work with once you learn the language.

Re:Object-Oriented Programming in C (2019) [pdf] by ncmncm on Sunday September 05, 2021 @04:36AM (#28422525)
Meaning blood? The sharks circle.
Re:Object-Oriented Programming in C (2019) [pdf] by voldacar on Sunday September 05, 2021 @04:17PM (#28427394)
The parent is the creator of the D language. It is a lot saner than C++ in my opinion, though it's not without its flaws
Re:Object-Oriented Programming in C (2019) [pdf] by jimbob45 on Sunday September 05, 2021 @04:07AM (#28422422)
C++ is fantastic if you need a more powerful language than C because of the "You don't pay for what you don't use" philosophy.

Of course, so is D...