C++ Programmers unite!
-
So there's all this talk of why C# is better than VB and why Ruby on Rails is just the peachiest thing ever, except that PERL is way hard core and blah blah blah. I found an old C++ T-shirt that I love: "My compiler compiled your compiler" And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic. C++ still kicks any .NET language's bum in terms of speed. C++ still allows you far more annoying and impressive errors than most other modern languages. So C++ devs: Tell us why C++ is just plain old better.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Not to spit a fellow C++ian in the soup, but here[^] is a nice summary of Raymond Chen (C++) vs. Rico Mariani (C#)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist -
...and don't forget the early c++ compilers really just generated intermediate C code which was then compiled to machine code. Just a glorified preprocessor, really :-D
:-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
James R. Twine wrote:
Because in the eyes of The Business, less control and more ease of use translates to better productivity -- more results for less money.
Isn't this really an indictment of the quality of programmers?
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
No, it is reflective of
some
programmers, not all programmers let massive memory leaks and sub-standard implementations get off their their desks. And the programmers like that... well, they F***
it up for the rest. There is also the problem where business-side people forget that nine women cannot make a baby in one month - some things just take time to get done right. High-quality code is one of them, and it is worth waiting for. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
Because your T-shirt basically said it. Java-heads - are you running on a JVM and/or using a base class library that was written in Java, or in C/C++? Remember Hotspot? That application that was created to speed up Java applications by converting to native code (which was required because Java was already fast enough, right)? Wanna guess what it was written it? .NET users - are the nitty-gritty internals of your lovely system that is so superior written in .NET? I believe that only recently, a .NET compiler was written in .NET. Only took a few years for this... (It was the new VB.NET compiler, I believe?) Oh, and the OS that it runs on? C/C++ are general use - in general, you can use them for anything. Java, .NET, Perl, etc. are specific purpose, usually by initial design or by evolution. When I can write a device driver in Java or .NET that performs identically and has the same capability as a pure C/C++ one, then I will be impressed with how quickly I can get it done. Do not get me wrong, things like the .NET platform are pretty damn powerful, but you have to keep in mind that they have limitations on what they can or should be used for. Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesJames R. Twine wrote:
Do not get me wrong, things like the .NET platform are pretty damn powerful, but you have to keep in mind that they have limitations on what they can or should be used for.
Very well put.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
I'm not sure that "better" applies to all situations, but, at least in many of the systems I've developed, C++ kicks .NET's butt. Mostly, I'm talking about performance, memory management and scalability. char* pBuffer = malloc(WHATEVER), while unpopular, mistreated and oft abused is quite a powerful construct. If I had to pick one feature that .NET needs, that would be simple: destructors. Who decided that deterministic finalization was a bad thing????? Oh yea, *pBuffer, pBuffer++ and all pointer related arithmetic, access, etc, is just plain fast & elegant, when used right. Personally, I like .NET just fine and plan to use it for just about any web applications I build. However, I also have written several Windows services and some mission-critical number crunching applications (and even one CGI application). I even tried to develop one of these in .NET, but the performance was abysmal. (BTW, don't tell me that I wrote the .NET app wrong, I asked around, sought advice from "experts", etc and ultimately, the architecture of .NET and the .NET framework were just in the way.) I would love to see a system come along that is evolutionary/revolutionary that actually produces faster code, not slower code, with each progressive release. This whole "layer cake" approach is getting quite heavy. And the current mantra of throwing hardware at performance problems is getting very very old. (Re-reading my post, I'm starting to feel old now.) :-D
Matt Gullett wrote:
Oh yea, *pBuffer, pBuffer++ and all pointer related arithmetic, access, etc, is just plain fast & elegant, when used right.
Got my 5 for the above. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Abu Mami wrote:
Learn C++, C, and then assembler.
Or do it in reverse order, with some additions. Gives one total understanding. Assembler = nice, tight, fast code. Elegance at it's best. You can do absolutely anything you want/need. You get to the true sole of the machine. Machine code - stuck in here so you can toggle bits and debug code on a target machine without compiling & relinking. Micro code - understand what makes the machine code work Design a CPU - understand how hardware logic converts software bits into hardware operations. C (viewed mixed with assembler) shows you how tightness looses just a little, plus some efficiencies through style (++i vs i++ vs i+=1 - they're different, you know). C++ - knowing C first makes understanding how C++ works a little easier, if that is your goal. ASM/C/C++ is the true garbage collector, collecting (any)Basic, Java, C#, .NET, COBOL, FORTRAN, running circles around them, then sending them to the dumpster. My biggest leap was Windows/MFC. I couldn't grasp it until I looked at the source to understand what it was doing under the covers.
Gary
ghle wrote:
Design a CPU
:laugh: Real programmers just build a custom CPU to perform the actions required for their app. I remember some stuff from school about a simple circuit for 1 bit of memory. something to do with looping the output from a NAND gate back to one of the inputs. It was a long time ago though.
Simon
-
So there's all this talk of why C# is better than VB and why Ruby on Rails is just the peachiest thing ever, except that PERL is way hard core and blah blah blah. I found an old C++ T-shirt that I love: "My compiler compiled your compiler" And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic. C++ still kicks any .NET language's bum in terms of speed. C++ still allows you far more annoying and impressive errors than most other modern languages. So C++ devs: Tell us why C++ is just plain old better.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
So there's all this talk of why C# is better than VB and why Ruby on Rails is just the peachiest thing ever, except that PERL is way hard core and blah blah blah. I found an old C++ T-shirt that I love: "My compiler compiled your compiler" And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic. C++ still kicks any .NET language's bum in terms of speed. C++ still allows you far more annoying and impressive errors than most other modern languages. So C++ devs: Tell us why C++ is just plain old better.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
C++ is not better, it is different. In being different you should always consider what its purpose is before dismissing it. C# is designed for the Business world, as CPU's are splitting left and right and doubling faster than stocks best dreams who is using that horse power? who is demanding it? why is it happening? Certainly if the world revolved around MS office and SQL searches one a minute and slowdowns directly related to the speed that a user can read and then type a response, we'd still be running a 286 at 25Mhz on an RLL drive. So what drove these machines we use every day? Games, military, scientific, video, analysis processing. High tech, math driven, monsters that are never satisfied no matter what you feed them. In the lead? Games. yes, games, not your solitaire that the business folks pride themselves as the supreme example of their mouse using talent. We're talking GAMES, en masse, in 3D with physics, realistic world textures, massive examples of math use. In this market every second counts, your compiler better be good, and your people talented. Even the military bows its head to the power of games, learn how to take advantage of that market, learn how to benefit from their lead, learn how to make it tick, and give us the benefit! That is the power of that market, even the powerful military nod their heads in amazement to the technology it drives. Eight cores will not be enough, physics processors will not be enough, 3D graphics and 128bit color will NOT be enough. It will never be enough, because this machine is driven by the real world. They want realism, and they want it bad. Not just looks the same, they want shattering glass that behaves like shattering glass? have you any idea the physics processing required for that tiny special effect to look real? amazing. And we are doing it. Soft body physics, the bounce of jello, the drape of cloth, the flex of a rope, and all related materials that follow these rules. Let alone, the kingpin of lovelies: fluids! Accurate fluid dynamic behaving liquids. This was not even done on Crays accurately when I entered the business! We are doing it on your laptop!! Why is C++ alive and well? because it never died. To the business programmer that prides himself in beating solitaire, C++ is dead because will never need to use it. Fine. But there is a drive to use performance on a massive scale. And that drive will not tir
-
Besides learning lower level languages like C, C++, even Pascal_
(!)
_, I would suggest learning about machine and/or CPU architecture/micro-architecture. Downloading or ordering the CPU manuals from AMD and Intel helps here. That kind of knowledge translates to most languages that you will be using in your lifetime, and gives you an appreciation for what your code actually does and how it gets executed. Learning how to take advantage of CPU pipelines, caches, multiple cores, etc. regardless of what language/platform you are using, will help you write the most optimal (note: I said optimal, not necessarily fastest) code that you can. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesJames R. Twine wrote:
I would suggest learning about machine and/or CPU architecture/micro-architecture
I've already learnt that kind of stuff. I'm not saying I could sit down and write a few pages of assembly that actually did anything useful, but I understand the archtechture, registers, memory addressing, etc. I try to understand as much of whats going on as possible. I use reflector to look through the .net framework now and again. I peek at the IL my code generates now and again. I think I'm gonna test drive C++ on my next personal project. Just for the fun of it really.
Simon
-
And assembler is a result of zeros and ones if you didn't know. You have to draw a line somewhere and the line is drawn at C++. Unfortunately it doesn't matter if you agree or not. I say this inspite of working on .NET for about a year now.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
You have to draw a line somewhere and the line is drawn at C++
I thought lines were drawn with Logo. :rolleyes:
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
-
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
C++ is not better, it is different. In being different you should always consider what its purpose is before dismissing it. C# is designed for the Business world, as CPU's are splitting left and right and doubling faster than stocks best dreams who is using that horse power? who is demanding it? why is it happening? Certainly if the world revolved around MS office and SQL searches one a minute and slowdowns directly related to the speed that a user can read and then type a response, we'd still be running a 286 at 25Mhz on an RLL drive. So what drove these machines we use every day? Games, military, scientific, video, analysis processing. High tech, math driven, monsters that are never satisfied no matter what you feed them. In the lead? Games. yes, games, not your solitaire that the business folks pride themselves as the supreme example of their mouse using talent. We're talking GAMES, en masse, in 3D with physics, realistic world textures, massive examples of math use. In this market every second counts, your compiler better be good, and your people talented. Even the military bows its head to the power of games, learn how to take advantage of that market, learn how to benefit from their lead, learn how to make it tick, and give us the benefit! That is the power of that market, even the powerful military nod their heads in amazement to the technology it drives. Eight cores will not be enough, physics processors will not be enough, 3D graphics and 128bit color will NOT be enough. It will never be enough, because this machine is driven by the real world. They want realism, and they want it bad. Not just looks the same, they want shattering glass that behaves like shattering glass? have you any idea the physics processing required for that tiny special effect to look real? amazing. And we are doing it. Soft body physics, the bounce of jello, the drape of cloth, the flex of a rope, and all related materials that follow these rules. Let alone, the kingpin of lovelies: fluids! Accurate fluid dynamic behaving liquids. This was not even done on Crays accurately when I entered the business! We are doing it on your laptop!! Why is C++ alive and well? because it never died. To the business programmer that prides himself in beating solitaire, C++ is dead because will never need to use it. Fine. But there is a drive to use performance on a massive scale. And that drive will not tir
5! And I thought Halo 3 was written on VB .NET :laugh:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Not to spit a fellow C++ian in the soup, but here[^] is a nice summary of Raymond Chen (C++) vs. Rico Mariani (C#)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighistWhat a trivial example, you don't have to split anything, just install Oracle 200MB Client Install and do some work with it. Then try against OLE DB, even via ADO.NET. Anyway, you want to talk I/O, you better get MS to ship managed IIS, and http.sys in next service pack, sqlserver.exe and ntfs too, oh and managed mscoree and the entire i386 directory. All I/O is native, by definition, it ends up native (you know, the thing that exists with or without managed TM LTD COM), and most of it out there is untyped.
-
James R. Twine wrote:
I would suggest learning about machine and/or CPU architecture/micro-architecture
I've already learnt that kind of stuff. I'm not saying I could sit down and write a few pages of assembly that actually did anything useful, but I understand the archtechture, registers, memory addressing, etc. I try to understand as much of whats going on as possible. I use reflector to look through the .net framework now and again. I peek at the IL my code generates now and again. I think I'm gonna test drive C++ on my next personal project. Just for the fun of it really.
Simon
I mis-wrote my original post - you learned machine architecture I believe (did they use RISC processors as examples? :)), but you should also learn CPU micro-architecture. Not just all the parts of a CPU, but how they work together. How out-of-order execution works, the Decode-Execute-Dipatch cycle, how to cause and prevent pipeline and cache stalls, etc. All those things help greatly when writing multithreaded/multicore code so you can prevent each one of your threads from effectively stepping on each other. Unless you do know all that already, then nevermind! :) Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
Rajesh R Subramanian wrote:
You have to draw a line somewhere and the line is drawn at C++
I thought lines were drawn with Logo. :rolleyes:
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
Nic Rowan wrote:
I thought lines were drawn with Logo.
No you're thinking of a pencil and ruler.
-
What a trivial example, you don't have to split anything, just install Oracle 200MB Client Install and do some work with it. Then try against OLE DB, even via ADO.NET. Anyway, you want to talk I/O, you better get MS to ship managed IIS, and http.sys in next service pack, sqlserver.exe and ntfs too, oh and managed mscoree and the entire i386 directory. All I/O is native, by definition, it ends up native (you know, the thing that exists with or without managed TM LTD COM), and most of it out there is untyped.
User of Users Group wrote:
Oracle 200MB Client Install and do some work with it
Hell no, I've never seen such shite.
User of Users Group wrote:
OLE DB, even via ADO.NET
Thanks quite... brings tears to my poor eyes. Try using pure COM with OLE.
-
5! And I thought Halo 3 was written on VB .NET :laugh:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
And I thought Halo 3 was written on VB .NET
Now you're being silly :)
-
Chris Maunder wrote:
"My compiler compiled your compiler"
5 For that!
Chris Maunder wrote:
And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic.
I remember I said this, may be a year ago: "Real men drive manual transmission". .NET is undeniably good for developing business applications. But most of the .NET devs ignore (or even don't know) the fact that there are other languages and every language has its own applicability.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
.NET is undeniably good for developing business applications. But most of the .NET devs ignore (or even don't know) the fact that there are other languages and every language has its own applicability.
That, is the single biggest and most enduring point of debate I have with any developer that had never known anything other than VB or .Net based languages.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
-
Rajesh R Subramanian wrote:
You have to draw a line somewhere and the line is drawn at C++
I thought lines were drawn with Logo. :rolleyes:
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
Did you get your car back? :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Nic Rowan wrote:
I thought lines were drawn with Logo.
No you're thinking of a pencil and ruler.
More like turtles :rolleyes:
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama "I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
-
Well put! You know, Torvalds' impression about C++ compared to C is similar to Maunder's impresion on C# vs C++.
Except for the fact that Linus Torvalds is a complete doofus and I actually respect Chris. Also Chris was being facetious, where as Linus's "complaints" were actually meant seriously, underscoring how big of an idiot he actually is.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog