Click here to Skip to main content
15,887,267 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Microsoft's Bill Gates places all bets on generative AI for 2024, says it will 'supercharge the innovation pipelin Pin
Kent Sharkey20-Dec-23 7:23
staffKent Sharkey20-Dec-23 7:23 
JokeRe: Microsoft's Bill Gates places all bets on generative AI for 2024, says it will 'supercharge the innovation pipelin Pin
Daniel Pfeffer20-Dec-23 7:58
professionalDaniel Pfeffer20-Dec-23 7:58 
GeneralRe: Microsoft's Bill Gates places all bets on generative AI for 2024, says it will 'supercharge the innovation pipelin Pin
fgs196321-Dec-23 7:10
fgs196321-Dec-23 7:10 
GeneralRe: Microsoft's Bill Gates places all bets on generative AI for 2024, says it will 'supercharge the innovation pipelin Pin
MarkTJohnson21-Dec-23 2:24
professionalMarkTJohnson21-Dec-23 2:24 
NewsC++ should be C++ Pin
Kent Sharkey19-Dec-23 9:01
staffKent Sharkey19-Dec-23 9:01 
GeneralRe: C++ should be C++ Pin
obermd20-Dec-23 8:48
obermd20-Dec-23 8:48 
GeneralRe: C++ should be C++ Pin
David O'Neil20-Dec-23 17:28
professionalDavid O'Neil20-Dec-23 17:28 
GeneralRe: C++ should be C++ Pin
trønderen21-Dec-23 1:00
trønderen21-Dec-23 1:00 
David O'Neil wrote:
Why? They are perfectly fine languages for those who want to understand programming.
Assuming that "programming" means "generating the proper machine instructions". If you want to learn basic computer hardware, C/C++ is almost as good a tool as assembler.

On the other hand, if "programming" means "systematically develop methods to solve an application problem", then you work in terms of the application domain. The user rarely if ever care about (or even know about) "memory leaks", constructors and destructors, even the difference between a float and a double. The user knows if a numeric value represents a count (or integer, as we call it) or a measurement (we call it floating point).

And so on. C/C++ is perfectly fine for managing a lot of tiny little details that have no direct relevance to the application problem. Managing the tools. Less so for solving the problem at the conceptual level.

I prefer to develop problem solutions at the application level without being concerned about memory leaks, cache, locality, stack alignment, overflow exception handlers, destructors, type casting, pointer arithmetic ... When the way to arrange the data and how to manage them to solve the problem is in place, and I go looking for a way to implement it on a computer, picking a language, I may of course say that "stack alignment and memory leaks are super essential for this to run!" that I go for C/C++. Or I could say: "I trust the compiler and runtime system to handle low level technical details is the best, or certainly good enough, way", and choose a language where you don't control those details, and don't have to worry about them. You worry about the application problem being solved in a correct way.

I have done my share of assembly, C and C++ programming. C# is one step up (unless you insist on digging down into the details, then it is just half a step), but only one step. The stairway is long.

Programmers tend to ridicule application-near languages and methodologies, and do not realize that the reason why these languages survive is that they don't bother the user with leaks, cache and multiple inheritance. Maybe a language allows some low level manipulation, but you don't have to. Can you do bit field manipulation in VB6? Maybe, but who cares. Even if you could do pointer arithmetic (if it was meaningful), I am quite sure that those who still program in VB never make use of it, or even know what it is. That is the reason why VB still lives: The programmer (who is often an application domain expert rather than a PhD in bit fiddling) doesn't know and doesn't care about those hardware details that are so essential to C/C++ people.

Besides: K&R C was little more than a set of assembler macros. You really could tell from the source code what the CPU was going to do. With OO, multiple inheritance, virtual and abstract functions, optimizing compilers and whatnot you still have an illusion of being close to the hardware, but fact is that a good share of C++ programmers do not have a clue about how, say, multiple inheritance works at the machine code level. So in small, selected areas you can use libraries (still hiding the machine code level that you really want to control) to give you an even stronger illusion of being in control. You don't have to, but still you have to cope with memory leaks and integer overflow. You pay the price, but without reaping the benefits of not having to worry about the details.

If your application domain is the inner workings of an OS, or a compiler, C/C++ may be a reasonable choice. For application problem solving, the things that C/C++ is really good at are not relevant at all.
GeneralRe: C++ should be C++ Pin
David O'Neil21-Dec-23 5:15
professionalDavid O'Neil21-Dec-23 5:15 
GeneralRe: C++ should be C++ Pin
trønderen23-Dec-23 4:55
trønderen23-Dec-23 4:55 
GeneralRe: C++ should be C++ Pin
David O'Neil23-Dec-23 16:58
professionalDavid O'Neil23-Dec-23 16:58 
GeneralRe: C++ should be C++ Pin
Greg Utas21-Dec-23 5:27
professionalGreg Utas21-Dec-23 5:27 
GeneralRe: C++ should be C++ Pin
trønderen23-Dec-23 3:17
trønderen23-Dec-23 3:17 
GeneralRe: C++ should be C++ Pin
Greg Utas23-Dec-23 3:43
professionalGreg Utas23-Dec-23 3:43 
GeneralRe: C++ should be C++ Pin
trønderen23-Dec-23 5:10
trønderen23-Dec-23 5:10 
GeneralRe: C++ should be C++ Pin
Greg Utas23-Dec-23 5:50
professionalGreg Utas23-Dec-23 5:50 
GeneralRe: C++ should be C++ Pin
David O'Neil23-Dec-23 17:15
professionalDavid O'Neil23-Dec-23 17:15 
NewsBlue Origin successfully launched and recovered its New Shepard booster Pin
Kent Sharkey19-Dec-23 8:01
staffKent Sharkey19-Dec-23 8:01 
GeneralRe: Blue Origin successfully launched and recovered its New Shepard booster Pin
MarkTJohnson19-Dec-23 9:49
professionalMarkTJohnson19-Dec-23 9:49 
GeneralRe: Blue Origin successfully launched and recovered its New Shepard booster Pin
Marc Clifton20-Dec-23 5:49
mvaMarc Clifton20-Dec-23 5:49 
GeneralRe: Blue Origin successfully launched and recovered its New Shepard booster Pin
obermd20-Dec-23 8:47
obermd20-Dec-23 8:47 
NewsSize, alignment, and memory layout insights for C++ classes, structs, and unions Pin
Kent Sharkey19-Dec-23 7:46
staffKent Sharkey19-Dec-23 7:46 
NewsIt took Microsoft more than a year to fix one of the most infuriating Windows 11 bugs Pin
Kent Sharkey19-Dec-23 7:46
staffKent Sharkey19-Dec-23 7:46 
GeneralRe: It took Microsoft more than a year to fix one of the most infuriating Windows 11 bugs Pin
obermd20-Dec-23 8:50
obermd20-Dec-23 8:50 
GeneralRe: It took Microsoft more than a year to fix one of the most infuriating Windows 11 bugs Pin
Kent Sharkey20-Dec-23 9:00
staffKent Sharkey20-Dec-23 9:00 

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.