Should I begin to learn a new language c++ in 2019?

I alway use python ,and recently I am into blockchain and found many projects was developed by c++.So,should I learn c++ or c for my blockchain programmmes?
You already invited:


Upvotes from: Britt Maree linda Dylan

The C++ and C# are totally different languages (don't let the apparent similarity in syntax fool you). If your primary goal is to learn C#, you should be absolutely fine starting with it (and not any other 'mother of all languages'). Unfortunately, I can't recommend any good learning resources for C#. As for C++, I still think it is a good idea to learn it anyway. It is a different approach to programming, which will help you become better programmer (even if you don't write code in C++). The problem with learning c++ is that too many people teach it as if it was C - pointers, memory management, close to hardware, microoptimisations, etc. Then they sprinkle some OOP pixie dust over it and call it a day. And it is not what c++ is about.


Upvotes from: Dylan Britt Maree

I'm a game developer who uses C++ daily (UE4 and SFML stuff, maybe Godot as well.) I use to be a web developer (Ruby dev and have switched to go). I suck at math. Game developer math isn't that difficult and we have calculators for the rest. AI in game development is typically visual sometimes done in C++ as well or C#. The fact is that a lot of programming transfers when it doesn't transfer we usually stick that new concept in it's own area. such as functional programming. Even auto into the C++ language shows that weakly typed languages showed their use. When programmers find cool things we tend to just mess around with it... Poke it. Take it on a trip. Mostly you will need to sit down and check out cool new things. Should you learn C++? Is C++ involved in the cool stuff you want to do? Find a middleware you want to poke at and get into. For people getting into game development from already have a background in programming I recommend either Unreal Engine 4 or Godot 3.0 (Beta is awesome already and if you are just learning it now then go for it!)

George - back-end

Upvotes from: Britt Maree

If you are a good programmer, you can write code in any language.  That does not mean you know all languages, it just means you have the talent to quickly adapt to the new language.  They are all basically the same, it is the application in the particular language that is different.   IF THEN ELSE logic is the same, no matter the language.  Use the language that best fits the project.

Britt Maree - Britt Maree into mango

Upvotes from: linda

Most blockchains are written in C++, and they are the future of the internet.I think you are confusing the language a program is written in and what this program does to data it gets as an input. Cryptocurrencies are basically lists of hashes, i.e. encrypted adresses which link to the person who owns a specific coin as well as encryptes lists of transactions. The blockchain on the other hand is a distributed program, which is written in a coding language like C++, Java, ... This program handles the encryption of the data (i.e. the coins) as well as the interactions between different users of the blockchain.


Upvotes from: Dylan

When I programmed Assembly back in the 80's it was necessary because of the cost of ram and performance with slow CPU's which brings me to a very valid point that should be considered wisely. TODAY'S code can be sloppy and massive because you no longer need to give a crap. I think today's programmers are lazy and take the easy way out instead of writing efficient code because they aren't dinged for it. Today's CPU take up the slack in terms of performance just the same as large memory and large hard disks. You can even credit a fast bus for sloppy writers. Unless you are creating embedded code or for something like a Raspberry Pi then you don't need good coders for anything. In ant case it's all outsourced to India anyway which destroyed the IT market so some CEO can make that much more money at the expense of American workers.


Upvotes from: Dylan

C, as well as assembler, are the main languages for embedded processor programming. To write code that actually follows what is going on inside the processor may be more difficult and time consuming, but it is infinitely more rewarding than pushing around program lines that are transparent to the CPU. I don't have a religious affiliation with any particular program language. But C and Assembly make you a better programmer  for higher level languages. When you understand how the CPU recognizes 1s and 0s and how its particular structure converts these bits into information and output control, you can visualize what your lines of code are actually doing. This, for me at least, allows me to have a much better understanding of what each line of code actually means. Therefore I make fewer mistakes and can solve programming problems much faster, no matter what program language I am using.


Upvotes from: Alex

C is almost 100% compatible with C++ but just ALMOST. Yet there are those subtle, game breaking differences, which could have been eliminated decades ago by complete integration of C into C++. As of now, coding in C and staying compatible with the C subset of C++ is easy, if you avoid a few incompatible behaviours (think of bool, sizeof() and so on), but it could have been better. C serves as the most important(!) common denominator among todays languages (C programs can be integrated in almost all other mainstream languages). And to accomplish this, C code is written with C++ compatiblity in mind. If you have C code COMPATIBLE with C++, it can be EASILY used by a huge set of other languages (C++, jni, cython, lua, mixed mode assembly for c# to toss a few keywords). But if your C code is incompatible with the C subset of C++ you run into all sorts of NASTY trouble when integration is an issue (better get fluent in assembler for debugging if you ever have to go down that road). The main point is, by integrating C into C++ the world of coding would have been a bit happier, since almost all C APIs are required to be C++ compatible today. Bottom line: If you want your API to be used by other people better stay C++ compatible like just about everyone else (unix/linux api, winapi, c-runtime (as a matter of course) ...) - in that sense C really is obsolete, the compatible subset of C on the other hand is the most important language in our world.

Alex - designer

Upvotes from:

I'm a hard-core C++ dev,Tons of beginners come to me and ask me the naive question "what's the best programming language", and I tell them "what do you want to do with it?" and they're surprised that I don't have a single universal answer. No, C++ is not the best for everything. You definitely can do everything with it, but only if you have an infinite amount of money.


Upvotes from:

C++ gives you low level and high level. Basically it combines benefits of C and assembly with benefits of supposedly higher level languages like C# and Java. With C++ you can program in the same manner as in those languages, but not to a virtual machine, to an actual machine.


Upvotes from:

With c++ u can do everything!! Blender, really popular games, whole programming languages were written with c++/c/c# !!


Upvotes from:

my two cents is this;  Two points that are important... 
1. If you know C++, then you'll often have gained the prerequisite knowledge to tackle other languages, which is something that doesn't always go the other way...  
2. Portability.  Write something in C++ and you can compile it on Windows, iOS, Android, etc.


Upvotes from:

C++ : Good for App development 
Java : Good for Web App development 
C : Good for embedded development 
Python: Good for NOTHING


Upvotes from:

I think C++ is good to learn because it teaches you more about how the computer works. You work more closely to the hardware and understand better what is going on. I also think it is worthwhile to learn Assembly because you are working directly with the CPU and memory. Most college curriculums will have at least one course in each. However, I don't think you have to be an expert at all in them unless your job demands it. But it wouldn't hurt to be somewhat familiar with them and get a glimpse on whats happening under the hood.


Upvotes from:

C++ is used to write almost every other language, compiler, and interpreter. That alone should be reason enough to learn it and understand it. Don't compare it to racing, compare it to having a license. I would never hire a programmer who doesn't know C or C++. A scientist or mathematician who uses Python or LabVIEW? Sure. But a programmer who doesn't know C is a hack


Upvotes from:

I have a problem with people calling C++ a low-level language. You can call Assembly or C low-level, but C++ is not C and it is not low-level. The C++ standard contains many high-level abstractions of things ranging from data structures to atomic variables to threads and asynchrony. You're given much more control in C++ than in other languages (especially with later standards like C++14 and 17) so you can maximize speed and efficiency. What sets C++ apart from high-level interpreted languages is its ability to stay fast, and what sets it apart from other high-level compiled languages is the fact that its abstractions can be efficiently deconstructed by compiler writers such that compilers can produce fast machine code. This is why nearly all performant code is written in C++ (disregarding embedded systems); this is why companies like Google and Facebook use C++ every day; this is why machine learning libraries that Python bindings are developed for are written in C++. C++ is fucking everywhere because it is a high-level language that, with practice, can be used to produce code that runs with unparalleled efficiency.


Upvotes from:

Been writing software for over 25 years, most of that time using C++. I've also produced commercial software in various other languages too. You are spot on. I stopped using C++ 2 years ago. I hope to never touch C++ again. Dealing with lib and header file management. There are much more productive languages out there today for various different tasks. A lot of new productive languages such as Golang allows you to focus on the design and architecture instead of code janitoring. I love C++ but these new languages are so much more productive. I will never go back.


Upvotes from:

It was my experience while learning in college that struggling with C++ made learning most other programming languages a breeze. If I had to give someone a cookie cutter answer, it would be that you should have a high, medium and low level language under your belt. As of the time of writing I would say that Python, Java and C++ are the most worthwhile of those categories. Python will increase your speed to write code dramatically. You will be able to solve algorithmic challenges and attack a problem with sooner success. C++ will give you the ultimate power to write very efficient and powerful code, but can be much more time consuming and frustrating. Java falls somewhere between the two as a high level language with many characteristics of a low level architecture. Java is fantastic for building GUI applications and doing network programming. If you want to write a small program that has a limited lifespan that only solves a task today.. Write it in Python. If you want to write code that will be used for years later, do it in C++.


Upvotes from:

Being a hobbyist game developer and graphics programmer C++ is the way to go because I have all most total control of how memory is used (both sys and with the introduction of Vulkan, Metal, and D3D12 vram). If your writing a business app use something like Python, Java, Ruby, C#, etc. If you want to create a high speed real time simulation that requires a ton of optimizations to pretty much any aspect of the project, c++ is the winner. I could use Rust or good old C for this but. C++ has so many libraries for this purpose plus has several ways to code up a solution (procedural, Object Orient, Generic). My issue is C is simple, I can do C programming in C++. As for Rust, its to new and doesn't have a big ecosystem just yet.

If you wanna answer this question please Login or Register