Click here to Skip to main content
15,885,546 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.

 
AnswerRe: New code in C? Where and why, versus C++? Pin
Mike Hankey2-Mar-21 5:32
mveMike Hankey2-Mar-21 5:32 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 6:58
mvahoney the codewitch2-Mar-21 6:58 
GeneralRe: New code in C? Where and why, versus C++? Pin
Mike Hankey2-Mar-21 8:51
mveMike Hankey2-Mar-21 8:51 
GeneralRe: New code in C? Where and why, versus C++? Pin
Martin ISDN2-Mar-21 22:37
Martin ISDN2-Mar-21 22:37 
AnswerRe: New code in C? Where and why, versus C++? Pin
  Forogar  2-Mar-21 5:46
professional  Forogar  2-Mar-21 5:46 
GeneralRe: New code in C? Where and why, versus C++? Pin
PIEBALDconsult2-Mar-21 5:52
mvePIEBALDconsult2-Mar-21 5:52 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch3-Mar-21 1:22
mvahoney the codewitch3-Mar-21 1:22 
AnswerRe: New code in C? Where and why, versus C++? Pin
Daniel Pfeffer2-Mar-21 5:52
professionalDaniel Pfeffer2-Mar-21 5:52 
Part of it is historical reasons, part the perceived overhead of C++ vs C, and part requirements of various Standards (as others have mentioned).

For example, neither Linux nor Windows use C in the kernel, because C++ RTL support for the kernel code does not exist. I did see an article about using C++ in Windows kernel drivers. It worked, assuming that (a) you didn't use things like exceptions, virtual function, etc., and (b) you don't use any RTL function that is not defined in the driver library.

One place I would probably use C in preference to C++ is hard real-time code. Because of the polymorphism support in C++, it is easier to write code with ill-defined latency in C++ than it is in C, but programmers with sufficient talent can do it in both languages. Smile | :)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.

AnswerRe: New code in C? Where and why, versus C++? Pin
glennPattonWork32-Mar-21 6:04
professionalglennPattonWork32-Mar-21 6:04 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 7:16
mvahoney the codewitch2-Mar-21 7:16 
GeneralRe: New code in C? Where and why, versus C++? Pin
giulicard2-Mar-21 21:52
giulicard2-Mar-21 21:52 
AnswerRe: New code in C? Where and why, versus C++? Pin
trønderen2-Mar-21 6:32
trønderen2-Mar-21 6:32 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 7:19
mvahoney the codewitch2-Mar-21 7:19 
AnswerRe: New code in C? Where and why, versus C++? Pin
David O'Neil2-Mar-21 7:17
professionalDavid O'Neil2-Mar-21 7:17 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch2-Mar-21 7:20
mvahoney the codewitch2-Mar-21 7:20 
GeneralRe: New code in C? Where and why, versus C++? Pin
David O'Neil2-Mar-21 8:10
professionalDavid O'Neil2-Mar-21 8:10 
GeneralRe: New code in C? Where and why, versus C++? Pin
W Balboos, GHB3-Mar-21 2:42
W Balboos, GHB3-Mar-21 2:42 
AnswerRe: New code in C? Where and why, versus C++? Pin
giulicard2-Mar-21 21:41
giulicard2-Mar-21 21:41 
AnswerRe: New code in C? Where and why, versus C++? Pin
Martin ISDN2-Mar-21 23:40
Martin ISDN2-Mar-21 23:40 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch3-Mar-21 0:34
mvahoney the codewitch3-Mar-21 0:34 
AnswerRe: New code in C? Where and why, versus C++? Pin
Behzad Sedighzadeh2-Mar-21 23:48
Behzad Sedighzadeh2-Mar-21 23:48 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch3-Mar-21 0:29
mvahoney the codewitch3-Mar-21 0:29 
AnswerRe: New code in C? Where and why, versus C++? Pin
Stuart Dootson3-Mar-21 0:01
professionalStuart Dootson3-Mar-21 0:01 
GeneralRe: New code in C? Where and why, versus C++? Pin
honey the codewitch3-Mar-21 0:28
mvahoney the codewitch3-Mar-21 0:28 
GeneralRe: New code in C? Where and why, versus C++? Pin
Stuart Dootson3-Mar-21 1:10
professionalStuart Dootson3-Mar-21 1:10 

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.