Why C++ for Unreal 4?

[=;135601]
Utter, utter nonsense. I disagree with what you’ve said.
[/]

You know, admitting you’re wrong isn’t the most horrible thing on earth. Much better than disagreeing on very valid arguments brought up here without any actual counter-argument. Not once have you touched on iteration time, enabling more people in the team to create game logic, CPU performance being less important in todays often GPU-limited games etc., or why in SnowDrop they clearly state they use visual scripting for way more than just “trivial” stuff including AI (which you denied being feasable in blueprints earlier).

By the way, how do you like this? Not very much I presume.

[]
Months? Wow, boy, I program with C++ over a decade now, had personal conversations with Mr Bjarne, etc etc, and you, you, someone who cannot grasp concepts says that after a few months of watching some videos you understand? Let me tell you, you understand very little and there is pretty huge chance that this will not change in future.
Seriously, months? You are just making huge fool of yourself saying such things and showing how limited you are if you are really thinking that way.
[/]

Now you’re just being defensive…

From what I gather, the reason that “Concepts” are going to help in error-reporting at compile-time for Templates, is that they provide a mechanism for defining compile-time checking of Template-argument requirements. After a programmer clearly defines a set of requirements, the compiler uses those to impose them onto all “specialization” occurrences in the code that uses these templates - and it does that at the calling-code’s location (meaning, at instanciation/specialization-point). This allows the compiler to first check/validate each template-use-point, with better-defined granularity, as well as associate this with each usage-point.
I think I understood it quite clearly. If I am wrong, I’de be happy to be enlightened…

Look, I didn’t claim to be an expert on C++, you probably know more about it than I do (and obviously Bjarn knows more than the both of us combined).

I am just quoting things I have read/heard/seen him say.

There is a very obvious and strong impression expressed by Bjarn and others (such as Herb Sutter, the chair of the ISO C++ committee), of grate dis-satisfaction with the past-and-present state of affairs of C++. They all love this language, and that is exactly why they are/have-been hurting, hence the C++11 standard (previously known as C++ 0x) which they have worked very hard on for many years now, as well as the whole huge initiative that Herb is currently promoting and leading, for bringing more/fresh people into the committee’s research-projects (Study-Groups) for further remedying the situation. There wouldn’t be this push and this momentum of work, had C++ been this perfect language/ecosystem that you imagine. They all know very well how much it is flawed, and are working hard to fix it. They don’t achieve this by “pretending” the problems don’t exist (as you are doing) - they do it by acknowledging their existence and admitting how painful it is to deal with many of these issues, and inviting people to contribute and help. This is a very mature and responsible attitude that I very much like, and is actually the main reason I am studying C++ these days - It all gives me much hope that C++ might still have a very bright and even exciting future.

I am getting very little of this attitude (if at all…) from you - all you do is generate unsubstantiated hype and unjustified idealization, that none of the leaders of this language has ever expressed (at least from what I’ve seen thus far).
You are consistently painting a “rosy” picture of the current state of affairs, that has no baring in reality, and just makes you seem very disingenuous (even immature).
If you are really excited about coding C++, at least for UE4, all the fun for you - I have seen stuff you made, and they are pretty impressive.
But you have to at least acknowledge your own bias, and take it into consideration, when recommending a route for others - it’s just the responsible thing to do.
Yes, UE4 is compiled with a C++11 compiler, which is more than I can say for a lot of other C++ code-bases/development-platforms, and that is a very good thing.
But to go one from there to claim that all game-studios and their personnel have nothing to gain from other environments for UE4, is just a pie-in-the-sky - it’s just a fantasy of yours…
As far as Epic is concerned, the main tool suited/targeted-for rapid-prototyping of game-logic, is Blueprint - NOT C++.
Meaning, for most people in any EU4 game-development team, Blueprint should be their go-to system to use for most cases (and as for other scripting-languages, they are proposed by others as a substitution/additional-alternative to this layer).
They should use it by consuming existing Blueprint modules, as well as extended/custom ones written by the team’s C++ developers which should mainly use it for exactly that purpose (writing extended/custom-modules), as well as for re-writing huge blueprints that either get too large to reason-about/maintain, too heavy in their performance-impact, or both.
So it’s not so much that C++ is useless, or that it’s a bad idea for Epic to have opened-up their code-base for extending-it/building on-top of it - claiming that would be just ridiculous, and so nobody does (at least not on this thread - including me). It is much more about not fixating on a single tool for all jobs, and also looking for a middle-ground between Blueprints and C++, that kind-of offers the best of both in many respects (that is basically what the SkookumScript-UE4-Integration is aiming at becoming).

So to summarize - I’ll just shout it out:
NOBODY, ESPECIALLY NOT EPIC (YOU KNOW, THE GUYS THAT MAKE UE4?) ARE SHARING YOUR VIEW(!!!)
Also, NOBODY, ESPECIALLY NOT THE LEADERS OF THE C++ STANDARD (YOU KNOW, THE GUYS THAT MAKE C++?) ARE SHARING YOUR IDEALIZATION OF IT(!!!)
How do YOU think that makes you look?

Despite what you insist on stating, not all issues people tend to have with C++ relate “exclusively” to their competence-level.
There are in fact MANY issues that are “systemic” to the language-design itself - a fact that C++ leaders are admitting quite openly and publicly. None of them share your view that “any issue any C++ developer is struggling with, is solely due to his own lack of knowledge/experience”. Quite the opposite, in fact.

That is a very big factor contributing to the appearance of other/new languages that strive to substitute C++ for systems-programming - in particular, “D”, “Rust” by Mozilla, and to-some-extent “Go” by Google. These are no minor projects/initiatives, and no puny companies - I am pretty sure Mozilla’s/Google’s engineers are quite competent in using C++, and these initiatives didn’t just come out of nowhere - there are very real and well known problems that such organisations are facing with their C++ code-bases, so much so that it was enough for them to justify trying to create an alternative (for them and other). It just wound’t possibly have happened had C++ been this perfect-shiny-gem you seem to try and make it look like…
In fact, I would go so far as to assume/guess that the recent momentum in C++ standards developments, is to some degree in response to such expressions-of-dissatisfaction by major players in the C++ arena…

And so, regardless of your personal experience with C++ and UE4, there are far too many heavily-experienced and highly-credited professionals that disagree with your view - so you’ll excuse us for preferring their word as opposed to yours. But even without “appealing to their authority”, the arguments speak for themselves.

So here is what I think is REALLY going on here - because it’s not your NORMAL kind of rationality (argumentatively, you’ve already lost a long time ago…):
You’ve hit some hard spots in your C++ development career - perhaps even got bitten by it really painfully - so much so that you’ve worked hard at constructing intricate and very clever work-around(s) - but that was a long time ago, so you don’t remember much of it - you’re probably mostly used to the quirks and using your hard-earned work-around-code that you have accumulated, and you are very proud of it and of your skill-set. You have become “invested” in your ability to deal with such torments. So much so, that it starts feeding your ego/self-esteem as the competent developer that you are. When you look at other people struggling with such pain-points, you think to yourself:
“Ha!.. They don’t know what I do - that’s why they are suffering! It’s not the language’s fault, it’s just that I am better at it then them… I actually kinda like my evolving ability to tackle such challenges - they make me feel good about myself. I even like the fact that these pain-points exist - they enable the gap between me and other lesser programmers - this language is just the best… I love it…”.

In that case, admitting that it’s actually the language that is at fault, would render your achievements futile, and thus degrade you self-esteem (deflate your ego).
If any of that sounds familiar, it’s because it’s actually pretty common - congratulations, you’ve fallen-in-love with your tormentor, and there’s a name for it in psychology - it’s called a “Stockholm-Syndrome” (look it up…). It is actually quite easy to rationalize once you get the hang of it - it’s a self-defense mechanism of the brain, and is very useful/beneficial in certain circumstances. It’s a way to spare yourself the pain of acknowledging the fact that you are being tormented, by re-framing/re-interpreting reality is a distorted way from which your circumstances seem beneficial. It’s a very commonly-recurring phenomenon, especially among people that deal with very difficult and painful problems (such as programmers…)
Well, most of us aren’t at that stage (yet) regarding C++, and “hopefully” never will be.
So try to look at it from our perspective, if you can…

[=The_E;135648]
Look, , everything you’ve said so far may be perfectly true and may work perfectly fine for you. But that doesn’t mean that your insistence that people who operate with different standards and priorities are wrong is correct too. You got your approach, we (and, as far as we can tell, a good part of the industry) have ours.
[/]

This thread is called: “Why C++ for Unreal 4”. It isn’t called “Why C++”, it isn’t called “Why UE4” either. In the spirit of that title my point of view I’m presenting is correct. Unreal Engine is build/designed mainly to allow build AAA games with highest standards of graphics, performance and usability just to name a few. That’s why C++ is used in this engine. Because C++ gives you all of this and more. Just to name a few.

If you are not interested in highest possible performance, flexibility and best achievable look then yes, you don’t have to use neither UE4 nor C++. But if you are, then you have to.

And yes, C++ isn’t ideal for everything. Sure. But for most things it is. Especially in gaming industry.

[=EruArnold;135713]
Now you’re just being defensive…

From what I gather, the reason that “Concepts” are going to help in error-reporting at compile-time for Templates, is that they provide a mechanism for defining compile-time checking of Template-argument requirements. After a programmer clearly defines a set of requirements, the compiler uses those to impose them onto all “specialization” occurrences in the code that uses these templates - and it does that at the calling-code’s location (meaning, at instanciation/specialization-point). This allows the compiler to first check/validate each template-use-point, with better-defined granularity, as well as associate this with each usage-point.
I think I understood it quite clearly. If I am wrong, I’de be happy to be enlightened…

Look, I didn’t claim to be an expert on C++, you probably know more about it than I do (and obviously Bjarn knows more than the both of us combined).

I am just quoting things I have read/heard/seen him say.

There is a very obvious and strong impression expressed by Bjarn and others (such as Herb Sutter, the chair of the ISO C++ committee), of grate dis-satisfaction with the past-and-present state of affairs of C++. They all love this language, and that is exactly why they are/have-been hurting, hence the C++11 standard (previously known as C++ 0x) which they have worked very hard on for many years now, as well as the whole huge initiative that Herb is currently promoting and leading, for bringing more/fresh people into the committee’s research-projects (Study-Groups) for further remedying the situation. There wouldn’t be this push and this momentum of work, had C++ been this perfect language/ecosystem that you imagine. They all know very well how much it is flawed, and are working hard to fix it. They don’t achieve this by “pretending” the problems don’t exist (as you are doing) - they do it by acknowledging their existence and admitting how painful it is to deal with many of these issues, and inviting people to contribute and help. This is a very mature and responsible attitude that I very much like, and is actually the main reason I am studying C++ these days - It all gives me much hope that C++ might still have a very bright and even exciting future.

I am getting very little of this attitude (if at all…) from you - all you do is generate unsubstantiated hype and unjustified idealization, that none of the leaders of this language has ever expressed (at least from what I’ve seen thus far).
You are consistently painting a “rosy” picture of the current state of affairs, that has no baring in reality, and just makes you seem very disingenuous (even immature).
If you are really excited about coding C++, at least for UE4, all the fun for you - I have seen stuff you made, and they are pretty impressive.
But you have to at least acknowledge your own bias, and take it into consideration, when recommending a route for others - it’s just the responsible thing to do.
Yes, UE4 is compiled with a C++11 compiler, which is more than I can say for a lot of other C++ code-bases/development-platforms, and that is a very good thing.
But to go one from there to claim that all game-studios and their personnel have nothing to gain from other environments for UE4, is just a pie-in-the-sky - it’s just a fantasy of yours…
As far as Epic is concerned, the main tool suited/targeted-for rapid-prototyping of game-logic, is Blueprint - NOT C++.
Meaning, for most people in any EU4 game-development team, Blueprint should be their go-to system to use for most cases (and as for other scripting-languages, they are proposed by others as a substitution/additional-alternative to this layer).
They should use it by consuming existing Blueprint modules, as well as extended/custom ones written by the team’s C++ developers which should mainly use it for exactly that purpose (writing extended/custom-modules), as well as for re-writing huge blueprints that either get too large to reason-about/maintain, too heavy in their performance-impact, or both.
So it’s not so much that C++ is useless, or that it’s a bad idea for Epic to have opened-up their code-base for extending-it/building on-top of it - claiming that would be just ridiculous, and so nobody does (at least not on this thread - including me). It is much more about not fixating on a single tool for all jobs, and also looking for a middle-ground between Blueprints and C++, that kind-of offers the best of both in many respects (that is basically what the SkookumScript-UE4-Integration is aiming at becoming).

So to summarize - I’ll just shout it out:
NOBODY, ESPECIALLY NOT EPIC (YOU KNOW, THE GUYS THAT MAKE UE4?) ARE SHARING YOUR VIEW(!!!)
Also, NOBODY, ESPECIALLY NOT THE LEADERS OF THE C++ STANDARD (YOU KNOW, THE GUYS THAT MAKE C++?) ARE SHARING YOUR IDEALIZATION OF IT(!!!)
How do YOU think that makes you look?

Despite what you insist on stating, not all issues people tend to have with C++ relate “exclusively” to their competence-level.
There are in fact MANY issues that are “systemic” to the language-design itself - a fact that C++ leaders are admitting quite openly and publicly. None of them share your view that “any issue any C++ developer is struggling with, is solely due to his own lack of knowledge/experience”. Quite the opposite, in fact.

That is a very big factor contributing to the appearance of other/new languages that strive to substitute C++ for systems-programming - in particular, “D”, “Rust” by Mozilla, and to-some-extent “Go” by Google. These are no minor projects/initiatives, and no puny companies - I am pretty sure Mozilla’s/Google’s engineers are quite competent in using C++, and these initiatives didn’t just come out of nowhere - there are very real and well known problems that such organisations are facing with their C++ code-bases, so much so that it was enough for them to justify trying to create an alternative (for them and other). It just wound’t possibly have happened had C++ been this perfect-shiny-gem you seem to try and make it look like…
In fact, I would go so far as to assume/guess that the recent momentum in C++ standards developments, is to some degree in response to such expressions-of-dissatisfaction by major players in the C++ arena…

And so, regardless of your personal experience with C++ and UE4, there are far too many heavily-experienced and highly-credited professionals that disagree with your view - so you’ll excuse us for preferring their word as opposed to yours. But even without “appealing to their authority”, the arguments speak for themselves.

So here is what I think is REALLY going on here - because it’s not your NORMAL kind of rationality (argumentatively, you’ve already lost a long time ago…):
You’ve hit some hard spots in your C++ development career - perhaps even got bitten by it really painfully - so much so that you’ve worked hard at constructing intricate and very clever work-around(s) - but that was a long time ago, so you don’t remember much of it - you’re probably mostly used to the quirks and using your hard-earned work-around-code that you have accumulated, and you are very proud of it and of your skill-set. You have become “invested” in your ability to deal with such torments. So much so, that it starts feeding your ego/self-esteem as the competent developer that you are. When you look at other people struggling with such pain-points, you think to yourself:
“Ha!.. They don’t know what I do - that’s why they are suffering! It’s not the language’s fault, it’s just that I am better at it then them… I actually kinda like my evolving ability to tackle such challenges - they make me feel good about myself. I even like the fact that these pain-points exist - they enable the gap between me and other lesser programmers - this language is just the best… I love it…”.

In that case, admitting that it’s actually the language that is at fault, would render your achievements futile, and thus degrade you self-esteem (deflate your ego).
If any of that sounds familiar, it’s because it’s actually pretty common - congratulations, you’ve fallen-in-love with your tormentor, and there’s a name for it in psychology - it’s called a “Stockholm-Syndrome” (look it up…). It is actually quite easy to rationalize once you get the hang of it - it’s a self-defense mechanism of the brain, and is very useful/beneficial in certain circumstances. It’s a way to spare yourself the pain of acknowledging the fact that you are being tormented, by re-framing/re-interpreting reality is a distorted way from which your circumstances seem beneficial. It’s a very commonly-recurring phenomenon, especially among people that deal with very difficult and painful problems (such as programmers…)
Well, most of us aren’t at that stage (yet) regarding C++, and “hopefully” never will be.
So try to look at it from our perspective, if you can…
[/]

You must be joking…

I don’t claim C++ is perfect. I am aware of many flows of it. Sure.

But (from the experience) I know that there is simply no substitute for it at the moment.
C#? javascript?

Just look at the software made with C# (Visual for example), the way it behaves and answer to yourself:
Do I want my product to behave like it? (mostly performance wise, but there is more to it than performance).

Am I biased in my opinion? Sure, aren’t you?

@Epic

Please tell me that C++ isn’t best (at the current state of affairs, that is available languages, hardware etc) for developing AAA games.

Please state that, give alternative (but not blueprints because they are not designed to replace C++ as a developing tool) which is superior to C++, and I will never take part in discussion about superiority of C++ over other (available at the moment) languages for AAA game developing.

  1. Nobody is arguing with the fact that C++ is currently the most performant language for writing game-engines and game-editors - we all know that.
  2. Unity is written in C++ - both the game-engine and the game-editor - so it is not comparable to visual-.
  3. Unity uses an additional-layer for scripting game-logic of games made with it, just like any game-engine (except for UE4, for now…)
  4. C# is not meant to substitute C++ for writing game-engines or game-editors - not in Unity, and not anywhere (except for the arguably failed-experiment called XNA by Microsoft…)
  5. C# is used as one of the “scripting-languages” layer, for coding game-logic in Unity (instead of a visual-scripting language such as Blueprint or SnowDrop’s varient).
  6. C# might not be the best option all-around for this layer (hence LUA for CryEngine and now UE4, as well as the up-coming SkookumScript for UE4)
  7. This thread is not about “which language should game-engines/editors be written in” - it is about “which language should game-logic be written-in UE4, additional to Blueprint”.

[=EruArnold;136069]

  1. This thread is not about “which language should game-engines/editors be written in” - it is about “which language should game-logic be written-in UE4, additional to Blueprint”.
    [/]

Yes, you are correct.^^^

And that’s why I’m saying:
At the moment there isn’t language better suited for such task than C++ with regards to performance, productivity, portability, flexibility and expressiveness.

[=;136073]
Yes, you are correct.^^^

And that’s why I’m saying:
At the moment there isn’t language better suited for such task than C++ with regards to performance, productivity, portability, flexibility and expressiveness.
[/]

That are many SkookrumScript users that would beg to differ…
There are also a few hundreds-of-thousands Unity users writing C# code, that have no complaints whatsoever about their code’s performance, and are very happy with writing in a slightly-higher level of abstraction, are much more productive then they would have been with C++ (and thanks to tools like R#), are not feeling constrained by any stretch (flexibility, expressiveness, or any other…), and are targeting the largest spectrum of platforms there currently exist in any game-engine - so they will also disagree with you.

[=EruArnold;136086]
That are many SkookrumScript users that would beg to differ…
There are also a few hundreds-of-thousands Unity users writing C# code, that have no complaints whatsoever about their code’s performance, and are very happy with writing in a slightly-higher level of abstraction- they will also disagree with you.
[/]

Sure, and there are millions upon millions Java coders who think that Java is best language.

This doesn’t change the fact that by using C++ you have the most versatile, the most portable, the most expressive , the most performant and powerful tool in your hand.

[=;136087]
Sure, and there are millions upon millions Java coders who think that Java is best language.
[/]

There are also many Javascripts programmers… What’s your point? None of them are writing game-logic code for a game-engine…

[=;136087]
This doesn’t change the fact that by using C++ you have the most versatile, the most portable, the most expressive , the most performant and powerful tool in your hand.
[/]

Even if that was “all entirely true for everything” (which it isn’t…) - These are still not the only factors to consider, and not even the most important ones when you put it to real-world scenarios - otherwise, Unity would not have survived for the past decade or so…

I am sorry, but your view of the world just fails to be mapped to reality…

[=EruArnold;136089]
There are also many Javascripts programmers… What’s your point? None of are writing game-logic code for a game-engine…
[/]

My point is that number of users DOES NOT reflect which language is best for what purpose.

[=EruArnold;136090]
Even if that was “all entirely true for everything” (which it isn’t…) -
[/]

Yes, it is.

I dont understant the huge hate for c++ some people have. Ive used unity a bit, and i can say C++ in UE4 is easier than C# in unity. All the hot reload features make it equivalent to a scripting lenguage, and all the help you get with managed memory for UObjects and similar make the most problematic part of c++ (dealing with memory) a non-issue, as its all managed by the engine itself. The only thing you have to take care is for instant crashes when accessing a null pointer, little else.

[=EruArnold;136086]
… writing in a slightly-higher level of abstraction, are much more productive then they would have been with C++…
[/]

You are WRONG.
C# does not provide higher level of abstraction to C++. Nor is more productive. Do your homework.

[=vblanco;136114]
I dont understant the huge hate for c++ some people have. Ive used unity a bit, and i can say C++ in UE4 is easier than C# in unity. All the hot reload features make it equivalent to a scripting lenguage, and all the help you get with managed memory for UObjects and similar make the most problematic part of c++ (dealing with memory) a non-issue, as its all managed by the engine itself. The only thing you have to take care is for instant crashes when accessing a null pointer, little else.
[/]

There’s no hate for C++ from my side. It’s funny actually, I went from C++ defender to “hater” in this thread, or at least it may seem that way. My original point was in fact that we don’t need C# in UE4 because we already have blueprints for scripting and C++ for performance-critical stuff. I was arguing that Epic should by no means waste precious dev time on such a feature. If it’s a third party implementing it, there’s no problem at all. Looking forward to the upcoming SkookumScript.

However, I have a problem when someone comes waltzing in here making silly Ferrari analogies and claiming that everything should be coded in C++, completely disregarding what’s going on in the industry and completely ignoring how important iteration and productivity are these days.

There’s no hate for C++ from my side. It’s funny actually, I went from C++ defender to “hater” in this thread, or at least it may seem that way. My original point was in fact that we don’t need C# in UE4 because we already have blueprints for scripting and C++ for performance-critical stuff. I was arguing that Epic should by no means waste precious dev time on such a feature. If it’s a third party implementing it, there’s no problem at all. Looking forward to the upcoming SkookumScript.

However, I have a problem when someone comes waltzing in here making silly Ferrari analogies and claiming that everything should be coded in C++, completely disregarding what’s going on in the industry and completely ignoring how important iteration and productivity are these days.
[/]

Said fiesta driver seeing Ferrari passing by.^^^

C++ is as productive as C#. The thing is that you have to be fluent in it.
And yes, most things should be done in C++.

I’ve programmed for over 40 years. 35+ years in C, 25+ years in C++, and 10+ years in C#.

[=;136138]
You are WRONG.
[/]

No, he’s not.

[]
C# does not provide higher level of abstraction to C++.
[/]

LINQ, delegates/events, async/await and garbage collection are all higher levels of abstraction that do not have equivalents in C++.

[]
Nor is more productive.
[/]

Visual and C# is by far the most productive programming tools I’ve worked with for a statically typed language and matches integrated environments like Smalltalk for programmer productivity. I’m much slower in C++ despite have far more experience with it.

[]
Do your homework.
[/]

I’ve done mine. And my experience (and that of lot’s of other developers I’m spoken to over the years) says you’re the one who’s consistently wrong here with your dogmatic insistence on only C++.

yes, he is. You are too by the way.
What do you mean delegates, events, awaits etc. don’t have equivalents in C++? When did you last time refreshed your knowledge about modern C++?

And as for Visual and being productive? You must be really joking, or you are really unaware of better tools.

For supposedly being so knowledgeable, I must say 's replies are very disappointing. A knowledgeable person wouldn’t need to throw titles or insults as an argument for his/her point. In fact, that does the exact opposite. The method of argumentation resembles a fanboy war more than an actual programmer exchange, making me think he’s either trolling, or has little understanding of programming.