this post was submitted on 18 Jun 2023
2 points (100.0% liked)
Programming
3347 readers
1 users here now
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It was once said, I think by Alan Perlis, that any programming language that doesn't change the way you think about programming is not worth learning. The other answers are valid in the sense that sometimes OOP is the best solution to a problem even in C, but more to the point you should learn when not to use OOP in the first place.
I'm trying to think of examples here. Maybe you should study the way strings are handled in C, if you're used to object-oriented string handling. C string manipulation is unapologetically non-OO. Also see the way arrays are passed to functions; instead of the array being an object with a size, functions on arrays will take 2 arguments: a pointer to the start of the array, and the array's size. The standard library's binary sort/search functions are also a good reference for how sophisticated C programming is done.