What's wrong with C++?

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
BTolputt
Greenskin
Posts: 121
Joined: Thu Feb 18, 2010 8:05 am
x 2

Re: What's wrong with C++?

Post by BTolputt »

The biggest reason for using the man languages I do (C/C++, Lua, PHP) is that they are stock-standard. There WILL be a C-runtime installed on the machine and the LAMP stack is defined by having PHP. Lua gets is compiled into the application.

With C#, F#, OCaml, or even Erlang (which I quite like) - you need to install and/or locate their runtimes. Said runtimes are large enough to make their inclusion in a download noticeable and by not including them, you need to watch out for version inconsistencies.

Ignoring, of course, the Mono/CLR software patents that Microsoft has. Not going to get into a flamewar about it here, but it does influence my choice when it comes to cross-platform software development :)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: What's wrong with C++?

Post by jacmoe »

I tried it just now. On a fairly virgin Linux Mint 9.
Epic fail.
I am going to uninstall that pile of rubbish.
I want to use GTK#, but: "assembly not available for mono. Net 3.5... " - tried setting Net to 3.0, 2.0,...
If software is not working the first time after installing it, it's simply not worth spending time on.
Of course, Google is not much help. :wink:

Hehe - I guess me and Monodevelop aren't meant to be together. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC
x 7

Re: What's wrong with C++?

Post by bvanevery »

BTolputt wrote:Ignoring, of course, the Mono/CLR software patents that Microsoft has. Not going to get into a flamewar about it here, but it does influence my choice when it comes to cross-platform software development :)
Most of the basic capabilities associated with C# are ISO Standard. It's .NET where you have to worry about patents. Simple answer as far as I'm concerned: don't use .NET.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

bvanevery wrote:C# came later and was informed by several years of industry experience with Java.
Which means only that Sun had several years to incorporate said experience as well, and didn't (and still hasn't).
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
Fulmens
Gremlin
Posts: 151
Joined: Sun Jun 22, 2008 8:29 pm
Location: Nantes, France
x 1

Re: What's wrong with C++?

Post by Fulmens »

syd wrote: There is one issue that the standard comity doesn't seem to worry about: interoperability.
The ABI hasn't been standardized, which introduce an inconvenient dependency on compilers. If C++ had standard specifications on calling conventions, symbol mangling, _export/_import keywords, and a standard .lib format; C++ binaries would be compatible between compilers, and consumable from other languages.
An application using some cross-platform library like QT wouldn't need to be compiled for each platform, it would only need to be re-linked (which could be done automatically at runtime).
These are the reasons that makes C++ slowly declining. The only reason it's still here today is that there is a huge amount of code locked in this language, which doesn't gives any space to alternatives.
I have no judgement about this, but I just wanted to point you to the part of wikipedia's article on name mangling that talks about this :
http://en.wikipedia.org/wiki/Name_mangl ... in_C.2B.2B
conallmmcg
Kobold
Posts: 29
Joined: Fri Jan 02, 2009 1:50 am

Re: What's wrong with C++?

Post by conallmmcg »

lol it would appear not jacmoe, did u install the add-in for gtk#? (tools->add-in manager->install add-ins) i wouldn't install gtk# 2.12 it didn't work the best for me, 2.10 would be best.
User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC
x 7

Re: What's wrong with C++?

Post by bvanevery »

xavier wrote:
bvanevery wrote:C# came later and was informed by several years of industry experience with Java.
Which means only that Sun had several years to incorporate said experience as well, and didn't (and still hasn't).
I'm going to hazard a guess that the fundamental design of Java painted them into a corner, and that they couldn't simply "upgrade" the design. Also there's a need to retain compatibility with everyone else's software, so language changes on the industrial scale of Java, C#, or C++ have to be conservative. I would also note that there are technical reasons why Python cannot be made to be fast, owing to the language design, but I'm not up on the reasons. I just know that despite all the people who have attempted it over all these years, none have succeeded.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

bvanevery wrote:
xavier wrote:
bvanevery wrote:C# came later and was informed by several years of industry experience with Java.
Which means only that Sun had several years to incorporate said experience as well, and didn't (and still hasn't).
I'm going to hazard a guess that the fundamental design of Java painted them into a corner, and that they couldn't simply "upgrade" the design.

That's probably true, but it still baffles me why they could never implement what makes .Net so simple to use -- a central assembly cache (GAC) where all of your core and basic class libraries go, and no more chasing around CLASSPATH all over the place. That's really all that the .Net framework is -- a CLR and a versioned set of class libraries. The language itself is a direct ripoff of Java, most likely stemming from the days when MS and Sun were at war over Java and MS apparently said "screw this, let's roll our own from scratch" and (perhaps accidentally) did a better job of the execution environment.

My $0.02 anyway. ;)
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
BTolputt
Greenskin
Posts: 121
Joined: Thu Feb 18, 2010 8:05 am
x 2

Re: What's wrong with C++?

Post by BTolputt »

C# are ISO Standard
That has no real bearing on whether or not there are patents involved, only that said patents need to be made available under "reasonable and non-discriminatory" terms... which still means they can charge people for deploying software using it so long as they make sure everyone pays the same amount (the term "reasonable" being so wishy-washy as to be meaningless).

For another example in this regard, look at the document formats which were recently made an ISO standard by Microsoft. They acknowledge that there are patents in said standard - they don't try to hide it.

ISO != Patent Free
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

ISO == International Organization For Standardisation

There is no such thing as a "closed standard" -- that's called "proprietary technology", regardless of how it's licensed.

MS may have patents on their implementation of the standards (or the software that uses them), but it is prima facie absurd to suggest a patent on a computer programming language (in this case, C#). For a supporting argument:

http://www.eweek.com/c/a/Application-De ... nt-Effort/
http://www.eweek.com/c/a/Application-De ... of-Reason/
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England
x 1

Re: What's wrong with C++?

Post by MrD »

xavier wrote:MS apparently said "screw this, let's roll our own from scratch" and (perhaps accidentally) did a better job of the execution environment.
You do have to admit that despite Microsoft's flaws, they do make damn good development tools.
Insimnax Framework - A game framework for OGRE
User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC
x 7

Re: What's wrong with C++?

Post by bvanevery »

MrD wrote:
xavier wrote:MS apparently said "screw this, let's roll our own from scratch" and (perhaps accidentally) did a better job of the execution environment.
You do have to admit that despite Microsoft's flaws, they do make damn good development tools.
No I don't. What's so good about them?
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

MrD wrote:
xavier wrote:MS apparently said "screw this, let's roll our own from scratch" and (perhaps accidentally) did a better job of the execution environment.
You do have to admit that despite Microsoft's flaws, they do make damn good development tools.
Don't get me wrong -- I like Visual Studio. The only tool that comes close on Linux is KDevelop (although TBH NetBeans isn't a bad C++ IDE either, believe it or not).

BVE -- could you be more specific about what you mean? I find tools like VS and PIX (both 360 and PC versions) to be massive productivity boosts when developing for those platforms.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
bvanevery
Goblin
Posts: 218
Joined: Wed Feb 28, 2007 4:54 am
Location: Asheville, NC
x 7

Re: What's wrong with C++?

Post by bvanevery »

I hate the MS build systems. I hate the documentation. I don't do GUI programming and so visual forms designers aren't any use to me. I don't really have time to go over anything else, and it's drifting off-topic anyways. I just challenge the statement that I "have to" admit that MS makes good development tools. That kind of statement makes most of my tech friends laugh, or cry. One of my Apple friends keeps trying to get me to jump ship. He claims he isn't anywhere near as miserable using XCode as he was using MS stuff.
User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England
x 1

Re: What's wrong with C++?

Post by MrD »

I'll just say one thing in retort to this, CodeWarrior. It's all I need to say as anyone who has used it will know what it is like. I had to use it a few times for the Wii... then I figured I could try and replicate the problem on the 360 instead using Visual Studio.
Insimnax Framework - A game framework for OGRE
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: What's wrong with C++?

Post by Klaim »

syd wrote:
I'm really amazed how slow is the process.
first time I heard about c++ 0x was back in 2005, on stroustrup's blog. today we are still waiting for a vote. then we'll have to worry which compilers are standard-compliant, and which part of the new standard is portable.
Not exactly : the vote already happened.
For the validation of ISO, it's the ISO administration that is very long.
For the compiler adoption, in fact it's one of the fastest adoption of new C++ features. Last standard took years. At least we have chances to have a feature-complete C++0x compiler in some years.
Some of the features are said to be trivial to implement because the compiler makers proposed them or already used systems to do it or simple already have everything ready for the implementation. That's what is implemented first in the compilers you know.
Some other features are said to be hard to implement. Those one are said to be complex because they require "massive" changes in the compiler. So don't hold your breadth, it will take years. I think we'll get a good idea of the implementation speed by the beginning of 2011.
There is one issue that the standard comity doesn't seem to worry about: interoperability.
The ABI hasn't been standardized, which introduce an inconvenient dependency on compilers. If C++ had standard specifications on calling conventions, symbol mangling, _export/_import keywords, and a standard .lib format; C++ binaries would be compatible between compilers, and consumable from other languages.
An application using some cross-platform library like QT wouldn't need to be compiled for each platform, it would only need to be re-linked (which could be done automatically at runtime).
These are the reasons that makes C++ slowly declining. The only reason it's still here today is that there is a huge amount of code locked in this language, which doesn't gives any space to alternatives.
I've read a lot about the ABI and there is some problems with platform/compiler optimization etc. Not all platforms are suited to the same ABI.
That said, they plan seem to work on a standardised ABI, at least in part. For C++0x they added specification about threading and there are plans for the following standard (that would be due in 2015 if all goes well--or at least better than C++0x).

What bother me is the lack of experimental implementation of the Concepts (type system for templates).

You might be interested in following the dev of CLang that is a C-based languages compiler that you can read about there: http://clang.llvm.org/
gcc will have C++0x features certainly quicker than CLang but I'm really interested by some features of this compiler, like the fact that it's easier than gcc to hack in, that it's module based, and the more important feature for a user dev. : it compiles FASTER.
Can't wait for a stable version.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

MrD wrote:I'll just say one thing in retort to this, CodeWarrior. It's all I need to say as anyone who has used it will know what it is like.
Painful? Excruciating? Proof that Nintendo hates their developers?
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

bvanevery wrote:I hate the MS build systems. I hate the documentation. I don't do GUI programming and so visual forms designers aren't any use to me. I don't really have time to go over anything else
Well, drive-by criticism doesn't do anyone much good. I don't see anything very objective in here, to be honest -- you simply don't like Visual Studio, which is fine. I'd like to know what you have tried to get the build system to do other than build code? Or are you saying you don't like the way you configure projects and solutions in VS? The build system itself has always worked fine for me.

I don't do forms programming most of the time either, but until very recently I've not found a code browser outside the VS environment that doesn't make me want to choke puppies. Personally, I'd rather spend my time coding solutions than looking through documentation trying to find supported methods and signatures. As for MSDN documentation -- what's wrong with being able to put the cursor on a word, hit F1 and get relevant documentation with those two UI actions? I really hope you are not going to tell me you prefer Googling and typing "man" all the time?
One of my Apple friends keeps trying to get me to jump ship.
Peoples' Temple members did the same thing too, in the 70's...or, to put it another way -- misery loves company? ;) Disclosure -- I have never touched XCode, I have no real need to program for an Apple product of any type, so it is an entirely uninteresting platform for me.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

Klaim wrote:Can't wait for a stable version.
You realize that you can build GCC to target LLVM as a backend, right?
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: What's wrong with C++?

Post by Klaim »

Oh yes, I wasn't talking about gcc and C++0x, just Clang as a faster compiler -- we c++ devs always want faster compilations don't we?
(by the way, here is the last module system proposal for the language : http://www.open-std.org/jtc1/sc22/wg21/ ... /n2316.pdf It's an interesting read. Might be the way to make compilers faster. And the language harder to understand, but we're already used to that. Haha. )

Using the last gcc version (4.6) is a good way to try some new C++0x features. There is a lot of things done already (and sometimes buggy).


edit>
xavier> Or do you mean that using llvm with gcc already makes it faster?

edit2>
Ok I understand what you mean now (i need to go sleep O__o). Yes I thought about starting using it in a future project. (maybe next year)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

I like LLVM -- I've used it in production code now and once you get your head around it, it's a lot of fun, actually.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England
x 1

Re: What's wrong with C++?

Post by MrD »

xavier wrote:
MrD wrote:I'll just say one thing in retort to this, CodeWarrior. It's all I need to say as anyone who has used it will know what it is like.
Painful? Excruciating? Proof that Nintendo hates their developers?
Yes, yes, and yes.

One of the most amusing things about it is that the window panels can have two states, floating or dockable. Sounds reasonable, right? Yeah, it is until you realise that what CodeWarrior calls "dockable" is actually a floating window, and what it calls "floating" is actually a dockable window. This point is made quite moot however by the fact that even if you get the layout to some sort of reasonable standard, you're just going to have to go through it all again when you next open CodeWarror as it doesn't remember the layout.

It also has the worst watch window I have ever seen, seriously. You can't change the variable you are watching at all, even to the point of not being able to modify the element in an array you are looking at, or dereference a variable so you can get the memory address to set a hardware breakpoint... in fact I'm not even sure it supports hardware breakpoints.

I think we may have gone slightly off-topic here.
Insimnax Framework - A game framework for OGRE
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: What's wrong with C++?

Post by xavier »

MrD wrote:
xavier wrote:
MrD wrote:I'll just say one thing in retort to this, CodeWarrior. It's all I need to say as anyone who has used it will know what it is like.
Painful? Excruciating? Proof that Nintendo hates their developers?
Yes, yes, and yes.
I always found the most endearing feature to be that it stores its project files in binary form...always fun in a source-controlled environment...

MrD wrote: I think we may have gone slightly off-topic here.

Yeah but we *are* in the "Off-Topic" forum... ;)
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England
x 1

Re: What's wrong with C++?

Post by MrD »

xavier wrote:I always found the most endearing feature to be that it stores its project files in binary form...always fun in a source-controlled environment...
Ah yes, sounds fantastic.

I can't really comment on things like that however as I haven't used those features. I didn't actually have an NDEV at work, so the only time I used CodeWarror was when I was fixing some Wii specific bugs, since I mostly did my tested on the PC and the 360 since they are far more friendly to debug.
Insimnax Framework - A game framework for OGRE
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Re: What's wrong with C++?

Post by Kojack »

I always found the most endearing feature to be that it stores its project files in binary form...always fun in a source-controlled environment...
Binary project files? Ouch.
I do preprocessing of Ogre's project files using ruby scripts, to make it suit my framework (changes directory structure around (like all temp files going into a common temp directory instead of spread through the hierarchy), removes cmake dependencies, makes everything relative pathed, etc). VS's xml project files make that incredibly easy.
Post Reply