StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. Languages
  4. Languages
  5. C vs Erlang

C vs Erlang

OverviewDecisionsComparisonAlternatives

Overview

Erlang
Erlang
Stacks1.4K
Followers749
Votes345
GitHub Stars11.9K
Forks3.0K
C lang
C lang
Stacks14.9K
Followers4.2K
Votes253

C vs Erlang: What are the differences?

Introduction:

C and Erlang are two programming languages that have distinct features and are used for different purposes. Understanding the key differences between these two languages can help developers choose the right language for their specific needs. In this comparison, we will highlight six major differences between C and Erlang.

  1. Memory Management and Concurrency Model: One of the fundamental differences between C and Erlang lies in their memory management and concurrency models. C is a low-level language that requires manual memory management, where developers are responsible for allocating and freeing memory. On the other hand, Erlang is a high-level language that provides automatic memory management, utilizing a garbage collector to release memory when it is no longer needed. Additionally, Erlang relies heavily on lightweight processes and message passing for concurrency, while C relies more on threads and shared memory.

  2. Type System: C has a static type system where types need to be explicitly declared and checked at compile-time. Any type mismatches can lead to compilation errors. Erlang, on the other hand, has a dynamic type system where types are determined at runtime. This flexibility allows Erlang to be more tolerant of type errors and enables easier code modification and development of highly dynamic systems.

  3. Error Handling: In C, error handling is primarily done using error codes or return values. Developers need to explicitly check and handle these errors, which can be error-prone and require extra code. In Erlang, error handling is based on the concept of "let it crash" where processes are isolated and can fail independently. This approach allows for fault-tolerant systems as errors are handled by restarting processes or forwarding to a supervisor process.

  4. Concurrency and Parallelism: C does not have built-in support for explicit concurrency and parallelism. Developers need to rely on external libraries or system-specific APIs to implement concurrent or parallel code. On the other hand, Erlang provides lightweight processes and message passing as a built-in feature, making it easier to write concurrent and parallel code. Erlang's processes can run on multiple cores, allowing efficient utilization of hardware resources.

  5. Pattern Matching: Pattern matching is a powerful feature in Erlang that is not present in C. Erlang's pattern matching allows for concise and elegant code to handle different data structures, making it easier to work with complex data manipulations and algorithmic implementations. C, on the other hand, requires more manual coding and manipulation to achieve similar functionality.

  6. Distribution and Fault Tolerance: Erlang has built-in support for distributed computing, allowing processes to communicate seamlessly across multiple nodes in a network. This capability enables the development of fault-tolerant and scalable systems. In contrast, C does not provide native support for distributed computing, and developers need to rely on external libraries or frameworks to achieve distributed functionality.

In summary, C and Erlang differ in memory management, type systems, error handling, concurrency models, pattern matching, and distributed computing. Understanding these differences helps in choosing the appropriate language based on the specific requirements of the project.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Erlang, C lang

Xiang
Xiang

Feb 23, 2021

Decided

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.

381k views381k
Comments
Satoshi
Satoshi

Mar 14, 2022

Needs adviceonC++C++C#C#.NET.NET

Actually, I'll add, C++ and C# as well.

Well, I'm into Computer Science since 1996, so I understand a bit of everything plus a lot of different OSs, I study 10 hours per day every day. However back in the 90s we didn't have books or universities about programming, all were passed through if you knew somebody in that profession. Which I did and in that time, he showed me .NET and MySQL, and that offered a lot of jobs also Java. Today you have a lot of options but I'm already discarding new languages as I believe they will jot succeed.

My always dream was to create game, and software. I don't understand all programming concepts and I'm studying all languages at the same time, so I'm heavy loaded. But that keeps me more aware.

I made a choice: use Python for everything but if you want performance, apps, security, compatibility, Multiplatform. What should I choose? The real question here is: which language should I go 100% and that language will teach me all I need about programming BUT without getting lost in that language forever (I discard any Assembly possibility) and one that has full documentation, support and libraries.

In my experience: I found a lot of info for python and java. But hardly I have ever found anything for C lang, C++ and, what about C# (it's only for Windows, is it easy, I saw a lot of documentation). Thanks!!

132k views132k
Comments
Pablo
Pablo

Software Developer at AvaiBook

Apr 6, 2021

Needs adviceonPHPPHPLDAPLDAPC langC lang

Hi! I'm working on some components in PHP for system administration to be released as reusable packages, to build some kind of server control panel with some time and patience.

I'm working on a credentials component to check things like the current user running the PHP process, the ability to change the password (which I would do through a shell command), and a very important feature: the ability to login with OS credentials.

For that purpose I'm already considering LDAP, but I want to support first an easy setup, like I would do for a small VPS. I want to login to my future panel with my Linux root credentials. This is very easy by parsing the /etc/passwd and /etc/shadow files, but I want to be multiplatform from the beginning.

How could I check a username/password in a similar way to login on Windows without having to configure Active Directory and similar things? I allow myself to use FFI to make external calls to native DLLs, so if the answer is on a Windows internal API it will not be a problem.

So, here is the question: is there any shell/C lang /C++ way to check if a given username and password matches a real Windows credential? Is there any way to check if that account is a root user? Thank you so much!

EDIT: If there's not any API to check a login, could it be done through reading the hashed password of a user, and hashing the provided one to check if they match? If so, how can you get the hashed password of a user, and how can you encode a password to compare both hashes?

22.7k views22.7k
Comments

Detailed Comparison

Erlang
Erlang
C lang
C lang

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.

No description available.

Statistics
GitHub Stars
11.9K
GitHub Stars
-
GitHub Forks
3.0K
GitHub Forks
-
Stacks
1.4K
Stacks
14.9K
Followers
749
Followers
4.2K
Votes
345
Votes
253
Pros & Cons
Pros
  • 62
    Concurrency Support
  • 62
    Real time, distributed applications
  • 58
    Fault tolerance
  • 36
    Soft real-time
  • 32
    Open source
Cons
  • 1
    Languange is not popular demand
Pros
  • 69
    Performance
  • 49
    Low-level
  • 36
    Portability
  • 29
    Hardware level
  • 19
    Embedded apps
Cons
  • 5
    Low-level
  • 3
    Lack of type safety
  • 3
    No built in support for concurrency
  • 3
    No built in support for parallelism (e.g. map-reduce)

What are some alternatives to Erlang, C lang?

JavaScript

JavaScript

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.

Python

Python

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.

PHP

PHP

Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

Ruby

Ruby

Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.

Java

Java

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

Golang

Golang

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

HTML5

HTML5

HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.

C#

C#

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.

Scala

Scala

Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.

Elixir

Elixir

Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase