Will we ever see an adoption of something other than C and C++?

Recommended Posts

So after coming across this thread about JAI, I got to thinking why haven't more people embraced D as the programming to use, especially over/instead of C++? But just in general, will any language ever replace C and C++? Or is the amount of inertia and legacy code too insurmountable for any other language (of that sort) to be fully embraced (ie. not be a niche language)?

Share this post


Link to post
Share on other sites

D didn't really do enough to set itself apart. I am sure that something will eventually replace C++ as the de-facto standard for games development on desktop and console platforms, but it will take a while to happen on its own. It is likely to helped along by some kind of hardware assist, at this point.

In the interim, the fact that language development has become so much more accessible is more likely to result in more choice, not less, of languages that are practical for making games. I think that's a better outcome overall than simply having "the next C++" show up and take over anyhow.

Share this post


Link to post
Share on other sites
2 hours ago, Alpha_ProgDes said:

But just in general, will any language ever replace C and C++?

Or will C++ replace itself (over and over)?

It seems to me that the C++ standard was quite static for a long period in the past. If we neglect the minor C++03 standard. There is a quite large gap between the C++98 and C++11 standard in the past. On the other hand, new standards evolve and will evolve much faster in the near future.

Edited by matt77hias

Share this post


Link to post
Share on other sites
11 minutes ago, jpetrie said:

In the interim, the fact that language development has become so much more accessible is more likely to result in more choice, not less, of languages that are practical for making games. I think that's a better outcome overall than simply having "the next C++" show up and take over anyhow.

It is true that you have languages and ideas such as DrRacket which stimulate the programming of programming languages. These are however quite high-level compared to C/C++. On the other hand, one of C++ most important pillars, is there computation time and memory concerns. For example with regard to syntactic sugar, the C++ committee is never going to except something that makes more verbose code faster.

Share this post


Link to post
Share on other sites
41 minutes ago, Kylotan said:

Tons of commercial games are already being made in C#.

For the games themselves, there is a larger variety: C#, JavaScript, Elm, Lua, Boo. Even Python (slow out-of-the-box) or Clojure (requires a JVM).

But for the engine itself, C/C++ seem more common. In order to add a third, huge APIs and frameworks need to be ported as well or at least alternatives need to exist.

Share this post


Link to post
Share on other sites

Sure, it's not turtles all the way down. We layer higher level languages on lower level ones. But as computers get more powerful, we're able to write less in the bottom layers.

Share this post


Link to post
Share on other sites

We're standing on top of forty years of C-based APIs and libraries.  Despite some attempts to slowly port or replace parts of that legacy - thinking of the Rust Evangelism Strikeforce redoing libc, or Microsoft trying to replace Win32 with UWP - everything is stacked up on top of those old C-based foundations.  There's a lot of inertia.

D is an interesting case.  I remember articles on here at least ten years ago touting D as a replacement for C++, but it just can't seem to get much traction.  Maybe if it had one of the giant tech companies pushing it, like Google does with Go, or on a lesser scale Mozilla is doing with Rust, but ultimately the Linux kernel is C, and the Windows kernel is C/C++, Android is Java, IOS is Obj-C/Swift, and the web is Javascript.

If I had to guess, what I imagine will happen is that we're more likely to see C++ continue to morph into different directions and evolve, rather than be replaced.  I've been watching that kind of process happen with C# over the last decade, as it keeps stealing more and more ideas from F# and other functional languages

Share this post


Link to post
Share on other sites

Hey guys, long time no post! Funny sequence of events that led to me checking in today.

My take: nothing will ever "replace" C++, because nothing will ever have the same degree of critical mass/hegemony that C had and C++ inherited. The language ecosystem will be more diverse and varied, with individual languages and their code being more generally portable, and practitioners more able to switch toolsets because the norm today is to have high-quality, cost-free, often open sourced implementations.

 

My other (and hotter!) take: JavaScript already "replaced" C++ as the language in which the largest subset of user-facing applications, and even server-side infrastructure, is written in.

Share this post


Link to post
Share on other sites

While not used too much for game development, Python has been strong for awhile, and over the past few years has grown dramatically for some industries.

My armchair amateur opinion is that C and C++ are likely becoming the optimized ""assembly"" behind the scenes (which is what C was originally designed for anyway) for those (fewer and fewer) situations that need it, and that other languages like Python and Javascript will increasingly be used for higher level code. Right now Python and Javascript don't seem to be the dominant gamedev high level language (though they are used on occasion), but it's possible their dominance in multiple other industries will spill over to gamedev and make them defacto industry-wide for high level code.

Share this post


Link to post
Share on other sites
2 hours ago, Oluseyi said:

Hey guys, long time no post! Funny sequence of events that led to me checking in today.

My take: nothing will ever "replace" C++, because nothing will ever have the same degree of critical mass/hegemony that C had and C++ inherited. The language ecosystem will be more diverse and varied, with individual languages and their code being more generally portable, and practitioners more able to switch toolsets because the norm today is to have high-quality, cost-free, often open sourced implementations.

 

My other (and hotter!) take: JavaScript already "replaced" C++ as the language in which the largest subset of user-facing applications, and even server-side infrastructure, is written in.

I really have nothing of value to contribute to this discussion. Hi, Olu! How ya been?

Share this post


Link to post
Share on other sites

Most of the console games that I've worked on were written in Lua.

(but yes, the engines were C++)

Maybe we'll all start using LLVM and use multiple language front-ends that all get compiled and linked together. 

I'm already linking together engine code in C, C++, and ISPC, and then layering Lua gameplay code and C# tools and wrappers on top. If other new languages like Jai can do what ISPC does and link directly with C++ code, that will help yo drive adoption. 

Share this post


Link to post
Share on other sites
27 minutes ago, JTippetts said:

I really have nothing of value to contribute to this discussion. Hi, Olu! How ya been?

Been good, thanks! How are you?

11 minutes ago, Hodgman said:

Maybe we'll all start using LLVM and use multiple language front-ends that all get compiled and linked together. 

It's an interesting idea, but I recently learned that mere shared use of LLVM does not mean that the languages built with it are inherently link-able. Specifically, Rust and Swift both use LLVM as their back-end, but their object models are different enough that engineering the type transparency, etc is a significant lift. Most efforts at commingling the two, for now, focus on using C FFI as a narrow aperture for invocations. Pity.

Share this post


Link to post
Share on other sites

I think for all the talk over the last decade or two of what will replace C/C++, what I see is new versions of C++ replacing older versions as the standard at least at the low level of engine development and libraries.  With faster and faster hardware it's easy for higher level, less optimized languages, to take hold for games that dont require much performance.  But, many games will always be trying to push the envelope of what's possible on the current hardware, and that means they will always be using something like C++... and C++ is doing a pretty good job recently (C++11 and on) of improving itself continuously.  With all the amount of C/C++ code already out there, backwards compatibility, the knowledge base, and the lack of similar performing languages that bring any significant advantages to the table, I see C++ as the standard for a long time to come.

Share this post


Link to post
Share on other sites
16 hours ago, Alpha_ProgDes said:

So after coming across this thread about JAI, I got to thinking why haven't more people embraced D as the programming to use, especially over/instead of C++? But just in general, will any language ever replace C and C++? Or is the amount of inertia and legacy code too insurmountable for any other language (of that sort) to be fully embraced (ie. not be a niche language)?

If you go abroad the industry and half of the game industry, C and C++ do not exist (or very few). In such service  IT, java (and its derivates) is almost the only language.

And if you look closer at the market, in the general programming, there are about less than 10% offers about C/C++ language. For the 90 other percents, java is predominant, with some C# that raised these last 10 years. But in these service companies (banks, insurances, web stuffs, institutions...) most of them choosed java 15 or 20 years ago, and they will never consider something else.

For example in the IT company where I work, we are 3 C++ developers and 50 java developers. In my previous company (in the industry), we were only C/C++ developers.

This is about the European programmer market. Maybe it's different in other countries.

Edited by _Silence_

Share this post


Link to post
Share on other sites
13 hours ago, Oluseyi said:

My other (and hotter!) take: JavaScript already "replaced" C++ as the language in which the largest subset of user-facing applications, and even server-side infrastructure, is written in.

JavaScript is considered as the assembly language for the web since it is the only programming language (HTML is a markup language, not a programming language) understood by all web browsers. We do not include real assembly languages in this discussion although they are still kind of unavoidable in the end (unless you are programming directly in machine language instructions, but there is a kind of 1:1 mapping anyway between machine and assembly languages), because they are too low level to be practical on a large scale in our code bases. I think similar arguments hold for JavaScript as well in some sense and we must take this into account while talking about the impact of JavaScript. Languages like TypeScript, CoffeeScript, Elm, etc. all transcompile to JavaScript in the end, since browsers can handle only the latter. Typescript for instance is a superior alternative to JavaScript and many large companies adopt it or plan to adopt it. This is especially due to the dynamic typed nature of JavaScript becoming a bottleneck in large code bases, since programmers eventually realize that their architectures are built on quicksand: without giant test suites (larger than for statically typed languages at least) you have no idea when your program is going to break in at compile-time (there is even no compile-time because JavaScript is generally a purely interpreted language). Furthermore, JavaScript has and had problems with standardization and formal verification.

There is even an iconic picture illustrating the quality of JavaScript (I don't know if this is the original picture :)):

4704268314_bb0e9d0ff3_b.thumb.jpg.a6b3fdbe30461539a6ce6ad04995beee.jpg

Edited by matt77hias

Share this post


Link to post
Share on other sites
2 hours ago, _Silence_ said:

java

Maybe this can change in the future as more common functionality is added to the platform-independent, standard C++ library. Before C++11, there was no std::mutex, std::thread, etc.

On the other hand, the JVM (including the Java bytecode compiler and JIT) consists of a very optimized compiler (I am talking about the JIT, the Java bytecode compiler is basically a lexer-parser-semantic analyzer). Together with C/C++ compilers, no other compiler comes even close to these compilers with regard to their level of optimizations. They also go back a very long time (resulting in lots of iterations and refinements).

Edited by matt77hias

Share this post


Link to post
Share on other sites
Quote

The be honest I'm almost happy with C++. There are two features that I really want and I'm not sure if the people in the standard will get them right:

 - reflections - I haven't seen any custom tagging or attributes, which kills 50% of the benefits of having reflections. Otherwise it is good for sanity checks and asserts, and maybe something else that I'm not currently aware of.

- modules - will fight the compile times and will cut some needless code.

 - and the last one which isn't proposed is multiple return values. I'm not OK with that tuples thing.

 

Edited by ongamex92

Share this post


Link to post
Share on other sites

In germany, i always get business job offers about java, c# and javascript programming only (mostly java), even though i have listed other languages as well - including low level ones like delphi and c/c++. I never got a single offer for c++ at all... but one for delphi :D which is a rare exception.

But it always depends on the kind of category you are working. For example in in the automotive industry there is a lot of special hardware involved, so there will always be C and C++ or some other low level languages. Making drivers for managed languages is a pita... But applications themself are mostly written in c# or java with bindings to the low level C libraries/drivers. Scripts, macros, math are written in mathlab, python or lua...

 

I expect this is similar to the game industry, there is C++ for all the engine low level core and then high level languages like lua/javascript/c#/java whatsoever.

 

But i see a future to be overwhelmed with a ton of full garbage collected, typeless, object oriented, functional languages without control of memory and performance at all. Maybe there will be 2-3 cores fully dedicated to do nothing else than collect memory garbage... moving the garbage collection to the hardware itself.

 

For C++ i dont see any future at all. I will fully get replaced with one of the higher level languages.

Share this post


Link to post
Share on other sites
46 minutes ago, matt77hias said:

JavaScript is considered as the assembly language for the web since it is the only programming language (HTML is a markup language, not a programming language) understood by all web browsers. We do not include real assembly languages in this discussion although they are still kind of unavoidable in the end (unless you are programming directly in machine language instructions, but there is a kind of 1:1 mapping anyway between machine and assembly languages), because they are too low level to be practical on a large scale in our code bases. I think similar arguments hold for JavaScript as well in some sense and we must take this into account while talking about the impact of JavaScript. Languages like TypeScript, CoffeeScript, Elm, etc. all transcompile to JavaScript in the end, since browsers can handle only the latter. Typescript for instance is a superior alternative to JavaScript and many large companies adopt it or plan to adopt it. This is especially due to the dynamic typed nature of JavaScript becoming a bottleneck in large code bases, since programmers eventually realize that their architectures are built on quicksand: without giant test suites (larger than for statically typed languages at least) you have no idea when your program is going to break in at compile-time (there is even no compile-time because JavaScript is generally a purely interpreted language). Furthermore, JavaScript has and had problems with standardization and formal verification.

There is even an iconic picture illustrating the quality of JavaScript (I don't know if this is the original picture :)):

4704268314_bb0e9d0ff3_b.thumb.jpg.a6b3fdbe30461539a6ce6ad04995beee.jpg

JavaScript will get be replaced as well. JS is old any rusty, slow and extremely error prone.

All applications / libraries written in that language are a nightmare.

Share this post


Link to post
Share on other sites
4 hours ago, matt77hias said:

JavaScript is considered as the assembly language for the web

I've never heard anyone make that comparison before.  And it's kind of a terrible analogy.  Javascript is about as far from assembly as you can get in terms of the kinds of languages we've spoken about so far.  Unless you count data/markup in that conversation.

Share this post


Link to post
Share on other sites
1 hour ago, trjh2k2 said:

I've never heard anyone make that comparison before.  And it's kind of a terrible analogy.

http://lmgtfy.com/?q=javascript+assembly+language+of+the+web

For instance: https://www.hanselman.com/blog/JavaScriptIsWebAssemblyLanguageAndThatsOK.aspx

(Just Googled it for you since the first time, I have heard it was during lectures.)

1 hour ago, trjh2k2 said:

And it's kind of a terrible analogy.  Javascript is about as far from assembly as you can get in terms of the kinds of languages we've spoken about so far.

"Of course, it is inaccurate because it's an analogy. That said, as analogies go, it's pretty good. Sure, assemblers are architecture and processor specific. Maybe "JavaScript is the Web's Bytecode" is better. At the very least, JavaScript is a totally reasonable compile target."

1 hour ago, trjh2k2 said:

Javascript is about as far from assembly as you can get in terms of the kinds of languages we've spoken about so far.

You need to take a look at the definition of assembly, because it can be seen much broader.

Java Bytecode for instance is clearly an assembly language generating instructions for a virtual processor, the JVM.

Edited by matt77hias

Share this post


Link to post
Share on other sites

Googling it still doesn't mean I've heard anyone actually make that comparison, not that nobody has ever said it.  Thanks for being condescending about it though.

I skimmed through some of the top results, and I stick by my opinion- Javascript as assembly isn't a good analogy.  One of the top results starts with a comment about opening up the 'view source' of a page and being surprised by the fact that the markup and code for the page had been minified and obfuscated.  They proceeded to calling it a "GUID", which makes zero sense.  That's not what a GUID is, and minifying a page has nothing to do with assembly.  If the point was the ubiquity of use, then a comparison to C or C++ would have been better, since it seems super uncommon for people to actually write assembly instead of something higher level, whereas people just write plain JS all the time.  If the point was that you can compile other languages into Javascript, then that still is a bad analogy 'cause you can do that with almost any other language.

Share this post


Link to post
Share on other sites

The first point is that JavaScript is the lowest programming level you can reach if you target the web and consider your browser as processor dictating the instruction set. The second point is that if people start looking at JavaScript in this way, where assembly is something you avoid in 99% of the cases in arbitrary (non-embedded) software projects, they start recognizing that they need to use higher programming languages. Higher in the sense that these languages are laid on top of JavaScript, though not that fundamentally different compared to the gap between x86 and C/C++ for instance.

Of course there are other languages A laid on top of other languages B. But here, nor A nor B are the most useful languages for general programming problems. JS on the other hand is completely inferior to TS for instance. With the exception of using existing JS libraries, you could not have an excuse to use JS.

Possible non-functional criteria used: usability, reliability, recoverability, supportability, adaptability, maintainability, configurability, etc. Applying these criteria to large general software projects, makes full JS (as opposed to the alternatives) as inferior as full assembly (as opposed to the alternatives) IMHO.

Edited by matt77hias

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now