Click here to Skip to main content
14,579,890 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: The future of (Modern) C++ (17) Pin
Nish Nishant20-Mar-18 3:16
sitebuilderNish Nishant20-Mar-18 3:16 
GeneralRe: The future of (Modern) C++ (17) Pin
Richard Andrew x6420-Mar-18 10:46
professionalRichard Andrew x6420-Mar-18 10:46 
GeneralRe: The future of (Modern) C++ (17) Pin
afigegoznaet20-Mar-18 20:16
professionalafigegoznaet20-Mar-18 20:16 
AnswerRe: The future of (Modern) C++ (17) Pin
afigegoznaet20-Mar-18 20:30
professionalafigegoznaet20-Mar-18 20:30 
GeneralRe: The future of (Modern) C++ (17) Pin
Super Lloyd20-Mar-18 20:51
MemberSuper Lloyd20-Mar-18 20:51 
GeneralRe: The future of (Modern) C++ (17) Pin
afigegoznaet20-Mar-18 22:05
professionalafigegoznaet20-Mar-18 22:05 
GeneralRe: The future of (Modern) C++ (17) Pin
jschell24-Mar-18 5:05
Memberjschell24-Mar-18 5:05 
AnswerRe: The future of (Modern) C++ (17) Pin
Member 798912220-Mar-18 23:38
MemberMember 798912220-Mar-18 23:38 
After many years of C/C++ programming, I took over a couple C# projects about six years ago, and was rather sceptical about the whole thing: Managed code, automatic garbage collection, ... But the code base was established long ago; language choice was not an option.

Then, after 3-4 years of C# coding I picked up one of my hobby projects ideas, returning to the efficient, full control, knowing-what's-really-going-on C++. ... I waded through a sump in a dense jungle of setup and initialization and management code that had no relatioship whatsoever to the problem I wanted to solve, but things like space management, interface to the OS, nitty-gritty I/O details... Trivial work that I really wish I could pay the neighbour's kid to do. But then I would loose control again.

And, I decided: I trust the C# compiler more than the neighbour's kid. It will do a professional job. And looking at e.g. the heap management methods, they are far more intelligent than my own C++ versions ever were. My C# code spends a far lower percentage of the code on non-problem-related setup and management: Execution dives right into the actual, application level, user visible task that the system is meant to solve. You don't need loads of code just to pet the programming language on its head.

I have done a few timings to see how "bad" performance C# has, compared to C++. Of course it varies with the kind of operations you do, and I haven't yet seen C# beating C++ (I never expected to) - but usually, running C++ code on the previous CPU generation, C# on the latest, they come out as roughly equal. My productivity being much higher, and my error rate much lower, when using C#, I have no desire to go back to C++.

When I tried to return to C++, I was still on Visual Studio 2010. I had been impressed with the programmer support it provided for C#, both in catching typos etc long before a build was attempted, and in helping me find the right functions etc. I expected the C++ support to be on the same level (previously, I had not been using a modern IDE when coding C++), but was very disappointed. I believe much of is the "flexibility" (or "You asked for it, you got it") of C++: The compiler (/VC syntax analyzer) simply cannot smack your fingers when you do something silly - it is silly, but legal C++ nevertheless... (prime example: Pointer arithmetic). Now I am on VC 2017, maybe C++ programmer support is now at the same level as for C#. I haven't tried C++ with VC 2017: Assembler coding (I've done my share of that!) belongs to history, so does C++. For me. (I would even start assembly coding again if I were paid a million, and again: so I would with C++.)

In my "computer humour" scrapbook, there is a discussion from 1998-99 (on NetNews/Usenet...) with this guy insisting that high level languages are a fad: They will never be able to compete with properly written assembly code. Well, it can. GC can compete with most hand-written heap management code. On-the-fly compilation of the intermediate language can be fine-tuned for the specific CPU in use. It will not go away. Even in the long run, a few people will need to know assembler language, a few will have to know Fortran, a few will have to know how to handle pointer arithmetic. But it won't be mainstream again.
AnswerRe: The future of (Modern) C++ (17) Pin
Super Lloyd20-Mar-18 23:59
MemberSuper Lloyd20-Mar-18 23:59 
GeneralRe: The future of (Modern) C++ (17) Pin
André Pereira21-Mar-18 1:10
MemberAndré Pereira21-Mar-18 1:10 
GeneralRe: The future of (Modern) C++ (17) Pin
Member 798912221-Mar-18 2:03
MemberMember 798912221-Mar-18 2:03 
GeneralRe: The future of (Modern) C++ (17) Pin
jschell24-Mar-18 5:13
Memberjschell24-Mar-18 5:13 
GeneralRe: The future of (Modern) C++ (17) Pin
Member 798912225-Mar-18 20:50
MemberMember 798912225-Mar-18 20:50 
AnswerRe: The future of (Modern) C++ (17) Pin
tom144321-Mar-18 2:23
Membertom144321-Mar-18 2:23 
GeneralRe: The future of (Modern) C++ (17) Pin
Super Lloyd21-Mar-18 2:44
MemberSuper Lloyd21-Mar-18 2:44 
GeneralRe: The future of (Modern) C++ (17) Pin
sasadler21-Mar-18 4:08
Membersasadler21-Mar-18 4:08 
GeneralRe: The future of (Modern) C++ (17) Pin
afigegoznaet21-Mar-18 20:24
professionalafigegoznaet21-Mar-18 20:24 
GeneralRe: The future of (Modern) C++ (17) Pin
Member 798912222-Mar-18 1:12
MemberMember 798912222-Mar-18 1:12 
GeneralRe: The future of (Modern) C++ (17) Pin
afigegoznaet22-Mar-18 1:18
professionalafigegoznaet22-Mar-18 1:18 
GeneralRe: The future of (Modern) C++ (17) Pin
sasadler21-Mar-18 3:59
Membersasadler21-Mar-18 3:59 
AnswerRe: The future of (Modern) C++ (17) Pin
Ed5921-Mar-18 4:06
MemberEd5921-Mar-18 4:06 
AnswerRe: The future of (Modern) C++ (17) Pin
Fernando A. Gomez F.21-Mar-18 8:49
MemberFernando A. Gomez F.21-Mar-18 8:49 
GeneralRe: The future of (Modern) C++ (17) Pin
afigegoznaet21-Mar-18 20:20
professionalafigegoznaet21-Mar-18 20:20 
AnswerRe: The future of (Modern) C++ (17) Pin
jschell24-Mar-18 5:03
Memberjschell24-Mar-18 5:03 
PraiseDoing my Ethics and Code of Conduct Annual Training Now Pin
Slacker00719-Mar-18 12:07
professionalSlacker00719-Mar-18 12:07 

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.