Page 1 of 1

D and Rust vs C++

Posted: Sun Apr 17, 2016 12:31 pm
by AronE.
Recently I've been doing a research on how D and Rust are going to surpass and replace C++, but since I'm not that much into programming, I had to ask people more experienced than me. And from my research I've gathered this : D and Rust are just like C++, just faster and a lot more simple.

-So, when are they going to replace C++?
-What do you think of this statement, saying that they are going to replace C++? Bullshit or not?

Aside from asking out of curiousity, I'm also looking for an answer, because I'm going to start C++ this summer and I need to know if it's worth it. Most likely this replacement will happen, but probably not that soon... Nevertheless, I have to ask just to be sure...

Edit: Also, what's the difference between C++98, C++99, C++03, C++11, C++14 ... The numbers are most likely refering to the year of release, but how are these standards different?

Re: D and Rust vs C++

Posted: Sun Apr 17, 2016 2:22 pm
by dandymcgee
AronE. wrote:Recently I've been doing a research on how D and Rust are going to surpass and replace C++, but since I'm not that much into programming, I had to ask people more experienced than me. And from my research I've gathered this : D and Rust are just like C++, just faster and a lot more simple.
That seems like a gross over-simplification of a rather complex discussion. Though I would be interested in reading whatever material led you to believe that either of those languages are "faster" or "more simple" as a general-purpose language.
AronE. wrote:-So, when are they going to replace C++?
Not in your lifetime. Well, I suppose that depends on how you define "replace". Has C++ "replaced" FORTRAN in your opinion? I can tell you from experience there are a *lot* of FORTRAN applications still running and being maintained on extremely vital systems. The same goes for any technology "of the past". If your definition of "replace" is that more new development is occurring in one of these new languages than is occurring in C++, then I'd say there's a minimum of 10-15 years before the upcoming programmers learning these new languages start bringing them into their workplaces.

The only way a 20+ year veteran C++ programmer is going to pick up a completely new language is if it's *infinitely* better than C++. A few minor advantages here and there usually come with a very minor disadvantages, and the cost benefit of learning a whole new language for a couple of features that are easier to implement than in C++ is just not worth it. It will probably take less time to do it in C++, since the development team is already intimately familiar with that language.
AronE. wrote:-What do you think of this statement, saying that they are going to replace C++? Bullshit or not?
I think it's a perfectly viable outlook to assume that eventually something will replace C++ as the industry-standard language eventually. That said, I'm yet to be convince that Rust or D are some revolutionary new thing that will spread like wildfire putting C++ programmers out on the street worldwide. I honestly just don't know enough about them, because I don't have a terrible amount of interest in learning new languages for the sake of it. I'll leave that to the more educated folks and when the majority of them start telling me one or the other is worth my time, then I'll look into it more seriously.
AronE. wrote:Aside from asking out of curiousity, I'm also looking for an answer, because I'm going to start C++ this summer and I need to know if it's worth it. Most likely this replacement will happen, but probably not that soon... Nevertheless, I have to ask just to be sure...
Learn C++. It's not going away any time soon, and the majority of the concepts you learn will apply to almost any language. Getting shit done is going to be a lot more valuable learning experience than learning [insert language here]. Programming languages are, after all, just tools. The means to an end.
AronE. wrote:Edit: Also, what's the difference between C++98, C++99, C++03, C++11, C++14 ... The numbers are most likely refering to the year of release, but how are these standards different?
A lot of things. I'm the sure exact changes are listed somewhere, but I don't know where off-hand. All of the basic are the same, so don't get too bent out of shape about this early on. Just learn intro-level C++ syntax, then later on you can read about the latest version and you'll better understand how those changes can improve your experience with the language.

Re: D and Rust vs C++

Posted: Tue Apr 19, 2016 2:57 pm
by AronE.
dandymcgee wrote: That seems like a gross over-simplification of a rather complex discussion. Though I would be interested in reading whatever material led you to believe that either of those languages are "faster" or "more simple" as a general-purpose language.

Not in your lifetime. Well, I suppose that depends on how you define "replace". Has C++ "replaced" FORTRAN in your opinion? I can tell you from experience there are a *lot* of FORTRAN applications still running and being maintained on extremely vital systems. The same goes for any technology "of the past". If your definition of "replace" is that more new development is occurring in one of these new languages than is occurring in C++, then I'd say there's a minimum of 10-15 years before the upcoming programmers learning these new languages start bringing them into their workplaces.

The only way a 20+ year veteran C++ programmer is going to pick up a completely new language is if it's *infinitely* better than C++. A few minor advantages here and there usually come with a very minor disadvantages, and the cost benefit of learning a whole new language for a couple of features that are easier to implement than in C++ is just not worth it. It will probably take less time to do it in C++, since the development team is already intimately familiar with that language.

I think it's a perfectly viable outlook to assume that eventually something will replace C++ as the industry-standard language eventually. That said, I'm yet to be convince that Rust or D are some revolutionary new thing that will spread like wildfire putting C++ programmers out on the street worldwide. I honestly just don't know enough about them, because I don't have a terrible amount of interest in learning new languages for the sake of it. I'll leave that to the more educated folks and when the majority of them start telling me one or the other is worth my time, then I'll look into it more seriously.

Learn C++. It's not going away any time soon, and the majority of the concepts you learn will apply to almost any language. Getting shit done is going to be a lot more valuable learning experience than learning [insert language here]. Programming languages are, after all, just tools. The means to an end.

A lot of things. I'm the sure exact changes are listed somewhere, but I don't know where off-hand. All of the basic are the same, so don't get too bent out of shape about this early on. Just learn intro-level C++ syntax, then later on you can read about the latest version and you'll better understand how those changes can improve your experience with the language.
Can't tell exactly how I stumbled upon these articles... And I have the basics covered on : C, Java, C#, Python, C++(I'm probably missing a language or two) and can tell what's different between programming languages. I remember when I was 13 and started with C, but gave up because loops were hard for me to understand... A year later I started HTML and CSS, I found it frustrating because these are easy as fuck languages, that require no logic at all and they challenged my brain... I knew that this isn't actual programming, just coding.. When I got used to it I felt coding in HTML and CSS like washing the dishes - it's boring, but has to be done. I started C#, but later on switched to Java, I still wasnt satisfied, I felt like it was pseudo-programming, switched to Python, now I have the same feeling... As if it's pseudo-programming... Something that isn't anything serious. I still lack the stable logic and thinking that many programmers have, but I can't find a way to teach myself that... I found some books about algorithms, in their descriptions is stated that these books can help me think through how to organize/structure my code as well, I hope they can help me... *Went kinda off-topic*


I want to ask something about assembly. How different are x86 and x64 Assembly? Should I bother myself learning x86? I remember two years ago, in a forum one guy said "imo you should learn x86 assembly first, because it can help you with the next step(x64), besides you have to know your roots" is that true?

edit: Is the ES gameplay programmed in FORTRAN?!?! I think in one of the videos I saw the word "end" in a code at the last line of some file... I was just curious.

Re: D and Rust vs C++

Posted: Tue Apr 19, 2016 6:18 pm
by dandymcgee
AronE. wrote:I want to ask something about assembly. How different are x86 and x64 Assembly? Should I bother myself learning x86? I remember two years ago, in a forum one guy said "imo you should learn x86 assembly first, because it can help you with the next step(x64), besides you have to know your roots" is that true?
I posted my thoughts on assembly in this thread: viewtopic.php?f=6&t=9118. I will re-iterate here: Ketman interpreter is *by far* the greatest assembly learning tool in existence. The tutorial is essentially teaching 16-bit real mode assembly but yes, the concepts of Intel's assembler language apply across the architecture size boundaries (though not as well across architecture manufacturer boundaries). 32-bit has more registers than 16-bit, and they are twice as large. 64-bit has more registers than 32-bit, and again the registers are four times as large (as 16-bit). Essentially when someone says it's a "32-bit application", they mean the program is compiled to assume a 32-bit addressable memory space. That is, 4 gigabytes (2^32 bits) of addressable memory. There are new instructions for the larger address spaces to move bigger chunks of data around at the same time (e.g. byte, word, dword, qword) since the registers are larger. Long story short, learn 16-bit real mode using Ketman, then download an actual assembler (NASM, MASM, SASM, ORGASM, etc.) and learn x86 extended instruction set, then move on and learn the 64-bit instructions.

Also, pretty much everything that is compiled is 64-bit today is still dual-compiled as a 32-bit application. It's going to be a while yet before every computer has a 64-bit CPU.
AronE. wrote:edit: Is the ES gameplay programmed in FORTRAN?!?! I think in one of the videos I saw the word "end" in a code at the last line of some file... I was just curious.
No, Elysian Shadows' gameplay logic is written in Lua. The engine is in C/++.

Re: D and Rust vs C++

Posted: Wed Apr 20, 2016 7:42 am
by AronE.
dandymcgee wrote: I posted my thoughts on assembly in this thread: viewtopic.php?f=6&t=9118. I will re-iterate here: Ketman interpreter is *by far* the greatest assembly learning tool in existence. The tutorial is essentially teaching 16-bit real mode assembly but yes, the concepts of Intel's assembler language apply across the architecture size boundaries (though not as well across architecture manufacturer boundaries). 32-bit has more registers than 16-bit, and they are twice as large. 64-bit has more registers than 32-bit, and again the registers are four times as large (as 16-bit). Essentially when someone says it's a "32-bit application", they mean the program is compiled to assume a 32-bit addressable memory space. That is, 4 gigabytes (2^32 bits) of addressable memory. There are new instructions for the larger address spaces to move bigger chunks of data around at the same time (e.g. byte, word, dword, qword) since the registers are larger. Long story short, learn 16-bit real mode using Ketman, then download an actual assembler (NASM, MASM, SASM, ORGASM, etc.) and learn x86 extended instruction set, then move on and learn the 64-bit instructions.

Also, pretty much everything that is compiled is 64-bit today is still dual-compiled as a 32-bit application. It's going to be a while yet before every computer has a 64-bit CPU.

No, Elysian Shadows' gameplay logic is written in Lua. The engine is in C/++.
"I just recommended this to another guy." You must be fed up answering these questions :D I know what bits are, but didn't know about the registers, which I find helpful. I find programming fun, but didn't know it could be hilarious "NASM,MASM,SASM, ORGASM..." :lol: Lately I've been acting like a child, I need to grow up :mrgreen:

Will GC become totally useless when I learn assembly or it's still going to handle some things for me?

Btw, why is the forum so dead? Is it the lack of video updates? Because I remember in November-December it was more crowded than now.

Re: D and Rust vs C++

Posted: Wed Apr 20, 2016 5:41 pm
by dandymcgee
AronE. wrote:Will GC become totally useless when I learn assembly or it's still going to handle some things for me?
Well, you can compile inline assembly in C, but I would not recommend you learn that way. It hides a lot of details and may just confuse you more than if you start with Ketman to learn the fundamentals then work your way up the ladder to modern complexities. At least, that's the way I've always learned best. To each their own.
AronE. wrote:Btw, why is the forum so dead? Is it the lack of video updates? Because I remember in November-December it was more crowded than now.
A combination of the project being quiet, the link being less prominent on the home page, and the fact that many of us have grown up and gotten real jobs (well.. all of us but Falco :mrgreen:) and therefore have less time to peruse the forums.

Re: D and Rust vs C++

Posted: Thu Apr 21, 2016 12:26 pm
by AronE.
What if I look at someone else's code? I remember almost a year ago I visited a website where people share their projects in the language they are native at. Can't remember the website.. Or what if I participate in open source projects? I have no idea how that works, what is required and what to do, but I'm interested in it.

Re: D and Rust vs C++

Posted: Thu Apr 21, 2016 6:45 pm
by dandymcgee
AronE. wrote:What if I look at someone else's code? I remember almost a year ago I visited a website where people share their projects in the language they are native at. Can't remember the website.. Or what if I participate in open source projects? I have no idea how that works, what is required and what to do, but I'm interested in it.
What if? Not sure what the context of this question is. If you mean learning in general, looking at existing code can help a bit, but there's no replacement for just getting down and dirty and writing something from start to finish. Doesn't need to be complicated, just needs to be finished.

Re: D and Rust vs C++

Posted: Sat Jun 04, 2016 10:56 pm
by Falco Girgis
Yeah... Right...

C++ was supposed to "replace" C. Java and C# were supposed to "replace" C++... Yet here we are, all of the languages alive and kicking...

That's just not the way this industry works.