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

Erlang

1.3K
739
+ 1
327
Lua

2.3K
990
+ 1
180
Add tool

Erlang vs Lua: What are the differences?

<Introduction>
  1. Concurrency Model: Erlang has built-in support for concurrency and distributed systems, with lightweight processes (actors) communicating via message passing, making it ideal for building scalable and fault-tolerant systems. Lua, on the other hand, lacks built-in support for concurrency; developers need to use external libraries or frameworks to achieve similar functionality.

  2. Strong Typing: Erlang is a dynamically typed language with strong type checking at runtime, ensuring better error handling and preventing type-related bugs. Lua, however, is dynamically typed without strong type checking, leading to potential type-related issues that may arise during runtime.

  3. Metaprogramming Capabilities: Lua offers powerful metaprogramming capabilities, allowing for features like metatables and metamethods that enable customizations and extensions of its behavior at runtime. In contrast, Erlang does not provide as extensive metaprogramming features, limiting the level of runtime customization available.

  4. Garbage Collection: Erlang employs a sophisticated garbage collection mechanism that includes strategies like generational and incremental garbage collection, optimizing memory usage and performance in long-running systems. Lua uses a simpler form of garbage collection, potentially leading to less efficient memory management in certain scenarios.

  5. Community and Ecosystem: Lua has a vibrant community and a wide range of user-contributed libraries and frameworks, making it easier to find resources and support for various programming tasks. Erlang, while known for its robust infrastructure and telecommunications applications, has a smaller community and may have more limited resources available compared to Lua.

  6. Language Features: Erlang includes features like pattern matching, fault tolerance mechanisms, and hot code swapping, which are specifically designed for building highly reliable and scalable systems. Lua, being a lightweight and embeddable scripting language, focuses more on simplicity and ease of integration with other systems, catering to different use cases compared to Erlang.

In Summary, Erlang and Lua differ in their concurrency model, typing system, metaprogramming capabilities, garbage collection strategies, community support, and language features, catering to different programming needs and priorities.

Advice on Erlang and Lua
Needs advice
on
JavaJavaLuaLua
and
PythonPython

I am trying to make Roblox game which requires Lua. I quite don't want to go with Lua just because other tools just might let me do more projects later on. I heard that Python is most similar to Lua, but I am still not sure which tool to use. Java, I think it will help me with many stuff later on for websites, projects, and more!

See more
Replies (2)
Rafey Iqbal Rahman
Cofounder at Wanderloop · | 7 upvotes · 381K views
Recommends
on
LuaLua
at

Since you are trying to make a Roblox game, you have no other option than to use Lua, since Roblox only allows coding in Lua. Yes, you've heard right, Python is identical and as easy as Lua, although Lua is easier than Python. Beginning from Lua and then escalating to Python is recommended. Java is only helpful when you are creating a heavy, big-budget, enterprise-level product, otherwise, Python would suffice.

See more
Recommends
on
TypeScriptTypeScript

If you really hate lua check out roblox-ts, a tool that compiles typescript code into roblox lua. https://github.com/roblox-ts/roblox-ts

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Erlang
Pros of Lua
  • 60
    Concurrency Support
  • 60
    Real time, distributed applications
  • 56
    Fault tolerance
  • 35
    Soft real-time
  • 31
    Open source
  • 21
    Functional programming
  • 20
    Message passing
  • 15
    Immutable data
  • 13
    Works as expected
  • 5
    Facebook chat uses it at backend
  • 4
    Practical
  • 4
    Knowledgeable community
  • 3
    Bullets included
  • 41
    Fast learning curve
  • 26
    Very easy to embed in C programs
  • 26
    Efficient memory usage
  • 20
    Open source
  • 19
    Good for game scripting
  • 9
    Pretty simple to learn
  • 8
    Quick to code
  • 8
    Simple Language
  • 7
    Syntax is amazing
  • 7
    Supported in most game engines
  • 6
    D
  • 2
    Coroutines
  • 1
    Can be used for a wide variety of development

Sign up to add or upvote prosMake informed product decisions

Cons of Erlang
Cons of Lua
    Be the first to leave a con
    • 4
      Nooby
    • 2
      Not widespread
    • 1
      D
    • 0
      Python

    Sign up to add or upvote consMake informed product decisions

    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.

    What is Lua?

    Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

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

    What companies use Erlang?
    What companies use Lua?
    See which teams inside your own company are using Erlang or Lua.
    Sign up for StackShare EnterpriseLearn More

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

    What tools integrate with Erlang?
    What tools integrate with Lua?

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

    Blog Posts

    GitHubDockerReact+17
    40
    36270
    GitHubPythonNode.js+26
    29
    15958
    What are some alternatives to Erlang and Lua?
    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.
    Haskell
    It is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis, fast prototyping and enhancing existing software environments with correct code, performance and scalability.
    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.
    Clojure
    Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.
    Akka
    Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
    See all alternatives