Need advice about which tool to choose?Ask the StackShare community!


+ 1

+ 1
Add tool

C++ vs Erlang: What are the differences?

C++: Has imperative, object-oriented and generic programming features, while also providing the facilities for low level memory manipulation. C++ compiles directly to a machine's native code, allowing it to be one of the fastest languages in the world, if optimized; Erlang: A programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of Erlang's uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems.

C++ and Erlang belong to "Languages" category of the tech stack.

"Performance" is the top reason why over 146 developers like C++, while over 49 developers mention "Real time, distributed applications" as the leading cause for choosing Erlang.

Erlang is an open source tool with 7.74K GitHub stars and 2.1K GitHub forks. Here's a link to Erlang's open source repository on GitHub.

According to the StackShare community, C++ has a broader approval, being mentioned in 199 company stacks & 371 developers stacks; compared to Erlang, which is listed in 70 company stacks and 47 developer stacks.

Advice on C++ and Erlang
Youcef Benamare
Needs advice

include include int main(){ char name[10], pasword[10]; printf("enter you user name :"); gets(name); printf("enter your pasword : "); gets(pasword); printf("your name : %s \n your password : %s \n", name, pasword); if ( name != "youcef") { printf("name undefined\n"); } else { printf("finde name"); }


his not working

See more
Replies (1)
Richard Rios
Senior Software Engineer · | 4 upvotes · 29.8K views

You will want to do a few things here. First, replace gets with fgets. Then, you're going to want to use strcmp from string.h to compare the input with the desired result. The code listed below has been updated with a working example with the previously mentioned recommendations. This isn't perfect and there are other ways to accomplish the same task. Explore other options that are available when you have a chance and see if you can improve on this example.

#include <stdio.h>
#include <string.h>

int main()
    char name[10], 

    printf("enter you user name :"); 

    // Use fgets as gets is insecure and can easily lead to buffer overflow exploits
    fgets(name, sizeof(char) * sizeof(name), stdin);

    // Remove \n from fgets stdin read with null character so as to not have to include
    // in strcmp later.
    name[strlen(name) - 1] = '\0';

    printf("enter your pasword : "); 
    fgets(pasword, sizeof(char) * sizeof(pasword), stdin);

    printf("your name : %s \n your password : %s \n", name, pasword);

    // If strcmp result > 0 || < 0 it's not a match
    if (strcmp(name, "youcef") != 0) 
        printf("name undefined\n"); 
        printf("finde name"); 
See more
Needs advice

Hello, I am interested in learning how to program. I am a beginner, and many articles saying I should go with Python if I am new to programming. I considered Lua a long time ago, but for my career, I believe major programming languages should be better for me. I'm considering Python at this moment, but if you have other tools I should use, let me know.

See more
Replies (2)

The language you choose is also dependant on the type of career / area of programming you wish to focus on: Web Based and mobile applicaitons I would lean towards Java, PC Applications I tend to like C#, Embedded industry C, C++

See more
anas mattar
Technical Lead at DPO International · | 2 upvotes · 47.3K views

my advice , you should answer me for this question, what do you like to work: web base or mobile native or cross platform. if you like web base you should choose PHP or or Node.js or if you like mobile native you should decide Android or IOS platform and else if you like cross platfrom you should learn Flutter with dart language. thanks

See more
Needs advice

Hi, I'm just starting to learn code, and I stumbled upon this website. I think I should learn JavaScript, Python, and C++ to begin with. I'm a quick learner so I am only worried about what would be more useful. Suppose my goal is to build an online clothing store or something. Then what languages would be best? I need advice. Please help me out. I'm 13 and just beginning and it's hard to understand when people use technical terms so please keep it simple. Thanks a lot.

See more
Replies (8)
Taimoor Mirza
Associate Software Engineer at Intech Process Automation · | 21 upvotes · 106.3K views

Go with Python. It's syntax is really simple and less verbose compare to others. You can use Python for basically anything like web dev, task automation, data science, data engineering, cybersecurity etc. At initial level, it's more important to get an understanding of programming fundamentals. Once you get conformable with coding in general, then you can explore other languages.

See more

I would worry less about languages when you're first starting out. If you want to build an online store, then javascript is a great language that is used all over the web! Get comfortable with your first language, learn some computer science concepts and how to build things the right way, and then just work towards a goal and learn as you go! is a great resource and it's completely free, everything you need to know to build a website is on that page if you have the drive to learn it. Best of luck to you!

Here's a neat roadmap too, in case you find yourself lost on what to learn next

See more

I recommend JavaScript to build your first website, for both FrontEnd and BackEnd , even tho I am a BIG fan of C++ it is not well suited yet to create websites, and Python would be just as good for the BackEnd as JavaScript but having everything written in only one language will make your learning curve way easier, so it is easy to recommend JavaScript.

See more

Python is an easy and beginner-friendly language. As you've mentioned about Online Clothing store, you'll need to deal with the website part and you'll need Javascript to make the site accessible and functional. Javascript will be more easy to learn if you learn Python first, so you can just start with Python.

See more

Hello Rachel, as a fellow programmer, I am glad that you are planning on expanding your coding knowledge and skills.

I recommend learning python first as it has a very simple syntax (syntax is how your code looks and how simple it is to type) and is also very user-friendly. Once you get to know how to code in python, you can use this thing called Flask.

Flask is what you call a "web application framework" or a WAF, it basically is a tool used to develop websites and other similar things. You don't have to worry much about it's difficulty because it is based on python. You will still have to learn how to use Flask though as it could be a bit complicating in first glance.

If you are looking for simpler ways for making website without having to learn a lot of programming, you can learn HTML and CSS. These 2 will help you in making a basic and functional website. The catch is, from a career perspective, HTML won't get you far, as literally every programmer knows it. So it is best to use programming languages.

I hope this gave you a clear understanding of the ways in which you can build websites. Wishing you the best of luck!

See more

I have worked with all these a ton. I make ecommerce and enterprise apps now. The only one of these you need is JavaScript. You can use JS on the backend as Node.js in AWS Lambda. You will need HTML and CSS skills, as well as a database. I recommend MongoDB. Please forget about C++ until you built your first company. Python fits the same purpose as Node.js but is currently popular in the Data Science community so skip it until you have a LOT of customers.

See more

Hi, When saying that "Suppose my goal is to build an online clothing store or something", I would go for a ready to use platform like Wordpress. it will give you a fast jump into the online world. By using WP you'll have to catch on with PHP\JQuery Goodluck.. Ping me when store is ready, I might buy something....

See more
John Akhilomen

Since you're new, I'd recommend Javascript and Python. With Javascript, just learn React and Node. And with Python, learn Django. With JavaScript, Node, React, Python, and Django; you can accomplish quite a lot for both frontend and backend.

See more
Decisions about C++ and Erlang
Alexandre Desroches
Founder & Developper at Finance D · | 52 upvotes · 111.6K views

I had a goal to create the simplest accounting software for Mac and Windows to help small businesses in Canada.

This led me to a long 2 years of exploration of the best language that could provide these features:

  • Great overall productivity
  • International wide-spread usage for long-term sustainability and easy to find documentation
  • Versatility for creating websites and desktop softwares
  • Enjoyable developper experience
  • Ability to create good looking modern UIs
  • Job openings with this language

I tried Python, Java, C# and C++ without finding what I was looking for.

When I discovered Javascript, I really knew it was the right language to use. Thinking of this today makes me realize even more how great a decision this has been to learn, use and master Javascript. It has been a fun, challenging and productive road on which I am still satisfied.

Obviously, when I refer to Javascript, it is not without implying the vast ecosystem around it. For me, JS is a whole universe in which almost every imaginable tools exist. It's awesome - for real. Thanks to all the contributors which have made it possible.

To be even clearer about how intense I am with Javascript, let's just say that my first passion was music. Until, I find coding with Javascript! Yep, I know!

So in conclusion, I chose Javascript because it is versatile, enjoyable, widely used, productive for both desktop softwares and websites with ability to create modern great looking user interfaces (assuming HTML and CSS are involved) and finally there are job openings.

See more

Python has become the most popular language for machine learning right now since almost all machine learning tools provide service for this language, and it is really to use since it has many build-in objects like Hashtable. In C, you need to implement everything by yourself.

C++ is one of the most popular programming languages in graphics. It has many fancy libraries like eigen to help us process matrix. I have many previous projects about graphics based on C++ and this time, we also need to deal with graphics since we need to analyze movements of the human body. C++ has much more advantages than Java. C++ uses only compiler, whereas Java uses compiler and interpreter in both. C++ supports both operator overloading and method overloading whereas Java only supports method overloading. C++ supports manual object management with the help of new and delete keywords whereas Java has built-in automatic garbage collection.

See more
Russtopia Labs
Sr. Doodad Imagineer at Russtopia Labs · | 0 upvote · 91.3K views

As a personal research project I wanted to add post-quantum crypto KEM (key encapsulation) algorithms and new symmetric crypto session algorithms to openssh. I found the openssh code and its channel/context management extremely complex.

Concurrently, I was learning Go. It occurred to me that Go's excellent standard library, including crypto libraries, plus its much safer memory model and string/buffer handling would be better suited to a secure remote shell solution. So I started from scratch, writing a clean-room Go-based solution, without regard for ssh compatibility. Interactive and token-based login, secure copy and tunnels.

Of course, it needs a proper security audit for side channel attacks, protocol vulnerabilities and so on -- but I was impressed by how much simpler a client-server application with crypto and complex terminal handling was in Go.

$ sloc openssh-portable 
  Languages  Files    Code  Comment  Blank   Total  CodeLns
      Total    502  112982    14327  15705  143014   100.0%
          C    389  105938    13349  14416  133703    93.5%
      Shell     92    6118      937   1129    8184     5.7%
       Make     16     468       37    131     636     0.4%
        AWK      1     363        0      7     370     0.3%
        C++      3      79        4     18     101     0.1%
       Conf      1      16        0      4      20     0.0%
$ sloc xs
  Languages  Files  Code  Comment  Blank  Total  CodeLns
      Total     34  3658     1231    655   5544   100.0%
         Go     19  3230     1199    507   4936    89.0%
   Markdown      2   181        0     76    257     4.6%
       Make      7   148        4     50    202     3.6%
       YAML      1    39        0      5     44     0.8%
       Text      1    30        0      7     37     0.7%
     Modula      1    16        0      2     18     0.3%
      Shell      3    14       28      8     50     0.9%

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of C++
Pros of Erlang
  • 184
  • 96
    Control over memory allocation
  • 90
  • 88
  • 77
    Object oriented
  • 54
    Industry standard
  • 44
    Smart pointers
  • 36
  • 16
    Gui toolkits
  • 15
  • 13
    Generic programming
  • 12
  • 10
  • 9
  • 7
  • 5
  • 5
    Full-fledged containers/collections API
  • 4
    Large number of Libraries
  • 4
    Many large libraries
  • 4
    Performant multi-paradigm language
  • 3
    Way too complicated
  • 1
    Plenty of useful features
  • 1
    Close to Reality
  • 1
  • 59
    Concurrency Support
  • 59
    Real time, distributed applications
  • 55
    Fault tolerance
  • 34
    Soft real-time
  • 30
    Open source
  • 20
    Functional programming
  • 19
    Message passing
  • 14
    Immutable data
  • 12
    Works as expected
  • 4
    Facebook chat uses it at backend
  • 3
  • 3
    Knowledgeable community
  • 2
    Bullets included

Sign up to add or upvote prosMake informed product decisions

Cons of C++
Cons of Erlang
  • 8
    Slow compilation
  • 7
  • 6
  • 6
    Fragile ABI
  • 5
    No standard/mainstream dependency management
  • 4
    Templates mess with compilation units
  • 3
    Too low level for most tasks
  • 1
    Unreal engine
  • 1
    Template metaprogramming is insane
  • 1
  • 1
    Compile time features are a mess
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is C++?

    C++ compiles directly to a machine's native code, allowing it to be one of the fastest languages in the world, if optimized.

    What is Erlang?

    Some of Erlang's uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use C++?
    What companies use Erlang?
    See which teams inside your own company are using C++ or Erlang.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with C++?
    What tools integrate with Erlang?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    May 6 2020 at 6:34AM


    Oct 24 2019 at 7:43PM


    What are some alternatives to C++ and Erlang?
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    C# (pronounced "See Sharp") is a simple, modern, object-oriented, and type-safe programming language. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers.
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
    See all alternatives