Click here to Skip to main content
15,881,281 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
W Balboos, GHB2-Mar-21 6:41
W Balboos, GHB2-Mar-21 6:41 
GeneralRe: Thought of the Day Pin
DerekT-P2-Mar-21 6:58
professionalDerekT-P2-Mar-21 6:58 
QuestionNew code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 3:36
mvahoney the codewitch2-Mar-21 3:36 
AnswerRe: New code in C? Where and why, versus C++? Pin
steveb2-Mar-21 3:57
mvesteveb2-Mar-21 3:57 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:08
mvahoney the codewitch2-Mar-21 4:08 
GeneralRe: New code in C? Where and why, versus C++? Pin
Rage2-Mar-21 4:14
professionalRage2-Mar-21 4:14 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:19
mvahoney the codewitch2-Mar-21 4:19 
GeneralRe: New code in C? Where and why, versus C++? Pin
Dave B 682-Mar-21 23:41
Dave B 682-Mar-21 23:41 
honey the codewitch wrote:
So if anything it seems a matter of education? Knowing what C++ will generate and what it won't.

Perhaps this is the biggest issue. The level of knowledge one has to earn to know how to make the compiler generate what they want and even more importantly, know what the compiler will generate when reading someone else's code.

This knowledge has a cost (potentially a high cost) that needs to be maintained by the organization through the expense of time and paid experience of every developer reading or maintaining the code. That expense must be offset by the reduction in cost of using C++ features that eliminate writing boilerplate code and organizing code.

I suspect with the far simpler rules/capabilities of C code, you have to look at a lot less code you didn't write to understand exactly what it is doing without resorting to using a debugger or looking at assembly.

My current opinion is that the decision of C versus C++ would come down to the project size and the pool and expense of developers you want maintaining the code.

Imagine a "C++ developer" jumping into a project that required diagnosing a set of code that used partial and full template specialization a few levels deep and being asked to refactor it. Could they do it? The statements "I know C++" and "I know C" carry two different levels of trust. I would trust most people who claim to know C and I can easily test their knowledge. With C++, the question for me becomes, what parts of C++ do you know and how well do you know each?
Dave B

GeneralRe: New code in C? Where and why, versus C++? Pin
TheGreatAndPowerfulOz3-Mar-21 11:54
TheGreatAndPowerfulOz3-Mar-21 11:54 
GeneralRe: New code in C? Where and why, versus C++? Pin
Rick York2-Mar-21 5:55
mveRick York2-Mar-21 5:55 
GeneralRe: New code in C? Where and why, versus C++? Pin
steveb2-Mar-21 15:16
mvesteveb2-Mar-21 15:16 
GeneralRe: New code in C? Where and why, versus C++? Pin
Rick York2-Mar-21 16:10
mveRick York2-Mar-21 16:10 
GeneralRe: New code in C? Where and why, versus C++? Pin
Matt McGuire3-Mar-21 5:09
professionalMatt McGuire3-Mar-21 5:09 
AnswerRe: New code in C? Where and why, versus C++? Pin
Greg Utas2-Mar-21 4:01
professionalGreg Utas2-Mar-21 4:01 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:17
mvahoney the codewitch2-Mar-21 4:17 
GeneralRe: New code in C? Where and why, versus C++? Pin
Greg Utas2-Mar-21 4:23
professionalGreg Utas2-Mar-21 4:23 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:29
mvahoney the codewitch2-Mar-21 4:29 
GeneralRe: New code in C? Where and why, versus C++? Pin
Greg Utas2-Mar-21 4:32
professionalGreg Utas2-Mar-21 4:32 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:34
mvahoney the codewitch2-Mar-21 4:34 
GeneralRe: New code in C? Where and why, versus C++? Pin
pkfox2-Mar-21 11:10
professionalpkfox2-Mar-21 11:10 
AnswerRe: New code in C? Where and why, versus C++? Pin
Rage2-Mar-21 4:12
professionalRage2-Mar-21 4:12 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:15
mvahoney the codewitch2-Mar-21 4:15 
GeneralRe: New code in C? Where and why, versus C++? Pin
giulicard2-Mar-21 21:48
giulicard2-Mar-21 21:48 
AnswerRe: New code in C? Where and why, versus C++? Pin
PIEBALDconsult2-Mar-21 4:18
mvePIEBALDconsult2-Mar-21 4:18 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 4:32
mvahoney the codewitch2-Mar-21 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.