1
vote
1answer
192 views

Which is the more testable C function implementation?

I write code in C. I have been striving to write more testable code but I am a little confused on deciding between writing pure functions that are really good for testing but require smaller functions ...
4
votes
1answer
570 views

Why are most GNU's software written in C [closed]

I am a Java developer, and I rarely write GUI program in C. However, I noticed that many GNU's projects, such as PSPP, R, Dia, etc., are written in C, instead of Java or C++. I personally don't mind ...
15
votes
1answer
572 views

How to effectively cooperate in a team having mixed background/mindset regarding OOP? [duplicate]

I've been recently assigned for a new high-performance C++ project (finance) together with 3 other guys who, like, me, refer to themselves as "primarily C/C++ programmers", meaning, all of us have ...
2
votes
1answer
141 views

OOP in C: which of these two approaches is closer to a cannonical solution? [closed]

Here are the two approaches to writing OOP (as in "we have objects and we can instantiate any number of them, each having it's own private data"). The language is C and the platform is embedded ...
2
votes
3answers
2k views

Is there any alternative to function pointers in c++?

I am a novice c++ programmer who kept an idea that function pointers are a thing of C and OOP in C++ does not recommend its usage. I know what I write here is vague/broad. But it will be great if ...
1
vote
1answer
154 views

Design for migrating to Multitenant architecture

We are in a process of redesigning our product code in such a way so as to support multitenancy. Currently the implementation is such that one product deployment caters to only one customer. Thus ...
-1
votes
2answers
908 views

Why is C++ preferred over C for commercial applications? [closed]

I program in C mostly. However, it is pretty obvious that many more commercial applications are done in C++. As far as I can tell, C++ is a very complex language, with seemingly convoluted syntax and ...
4
votes
4answers
2k views

Was C designed to facilitate Object-Oriented programming?

I am trying to broaden my understanding of the history and development of object-oriented programming, and I am curious to find out if C was designed to facilitate Object-Oriented programming? (like ...
1
vote
3answers
681 views

good literature for teaching object oriented thinking in C [closed]

Quite often C is the primary platform for the development. And when things are large scale, I have seen partitioning of the system as different objects is quite a natural thing. Some or many of the ...
5
votes
8answers
662 views

Learning OO for a C Programmer [closed]

I've been programming professionally in C, and only C, for around 10 years in a variety of roles. As would be normal to expect, I understand the idioms of the language fairly well and beyond that ...
5
votes
3answers
2k views

Make use of design patterns in C? [closed]

Design patterns are useful for object oriented languages. But how can a non-object-oriented language such as C make of use them?
1
vote
3answers
509 views

Objects in non-OOP languages

Can we use the word "object" for data / functions in e.g. C (or Pascal) which doesn't really have objects? In C, what is an object? A data structure? A named memory area? I spoke to my collegue about ...
51
votes
15answers
16k views

What makes C so popular in the age of OOP?

I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java. TIOBE Programming Community Index I'm curious as to why, in this age of OOP, C is ...
0
votes
3answers
161 views

Roadblock-confused about structure of program

I'm new to programming, and I'm working in C. I know that this is structured programming but if I use blocks, say for local variables: { int i; for(i=0; i<25; i++){ printf("testing...\n"); ...
0
votes
1answer
3k views

What are C's advantages over OOP languages, other than performance? [duplicate]

Possible Duplicate: When to use C over C++, and C++ over C? C still has its own importance in the programming world! And one reason for it is its performance. But, I have some questions. ...
40
votes
12answers
14k views

What's the benefit of object-oriented programming over procedural programming?

I'm trying to understand the difference between procedural languages like C and object-oriented languages like C++. I've never used C++, but I've been discussing with my friends on how to ...
9
votes
3answers
1k views

What are the typical naming conventions for OO C public and private functions?

Short Question Is there a typical way to name 'public' and 'private' members of an OO C project? Background I fully understand that public and private members do not really exist in the C language. ...
3
votes
3answers
308 views

Do simple accessors and mutators benefit from commented block headers?

Short Question Is it necessary to add the function header comments for simple accessors and mutators? Example u8 OBJ_get_state_x(void) {return obj.state_x;} void OBJ_set_state_x(u8 x) ...
30
votes
17answers
7k views

How can I feel more confident about my programming skills? [closed]

Programming isn't alien to me. I first starting doing markup (HTML, now please don't laugh at me) when I was 12 and a little bit of BASIC when I was 13 (I knew much about Flowcharts, Pseudocodes at ...
10
votes
6answers
631 views

Where, in an object oriented system should you, if at all, choose (C-style) structs over classes?

C and most likely many other languages provide a struct keyword for creating structures (or something in a similar fashion). These are (at least in C), from a simplified point of view like classes, ...
3
votes
6answers
6k views

When is C a better choice than C++? [closed]

I can't imagine that there's any reason not to use the OOP features of C++. It's is just as fast as C, and - what's more important to me - it's transparent, just as C. (I mean "transparent" that I ...