Get Advice Icon

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

C++
C++

3.7K
2.4K
+ 1
601
Lua
Lua

519
259
+ 1
63
Add tool

C++ vs Lua: 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; Lua: Powerful, fast, lightweight, embeddable scripting language. 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.

C++ and Lua can be primarily classified as "Languages" tools.

"Performance" is the top reason why over 146 developers like C++, while over 19 developers mention "Fast learning curve" as the leading cause for choosing Lua.

Lua is an open source tool with 1.26K GitHub stars and 437 GitHub forks. Here's a link to Lua's open source repository on GitHub.

Lyft, Twitch, and Coderus are some of the popular companies that use C++, whereas Lua is used by Shopify, Close, and Thumbtack. C++ has a broader approval, being mentioned in 194 company stacks & 357 developers stacks; compared to Lua, which is listed in 55 company stacks and 22 developer stacks.

- 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 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.
Get Advice Icon

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

Why do developers choose C++?
Why do developers choose Lua?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con

    Sign up to add, upvote and see more consMake informed product decisions

    What companies use C++?
    What companies use Lua?

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

    What tools integrate with C++?
    What tools integrate with Lua?

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

    What are some alternatives to C++ and Lua?
    C
    PHP
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
    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 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.
    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!
    See all alternatives
    Decisions about C++ and Lua
    StackShare Editors
    StackShare Editors
    Rust
    Rust
    Lua
    Lua

    To handle its growing observability needs, Postmates created and open sourced Cernan, a telemetry and logging aggregation server. Ceran is built on Rust and Lua, and can ingest data from many sources and then push or exposes what it’s collected to many destinations, or “sinks.” It can also create or manipulate in-flight data with programmable Lua filters.

    See more
    Dima Korolev
    Dima Korolev
    Principal Maintainer at Current · | 3 upvotes · 13.2K views
    atFriendlyDataFriendlyData
    C++
    C++
    Ruby
    Ruby
    #Grammar
    #NLP
    #BNF

    Ruby NLP C++ Grammar #BNF

    At FriendlyData we had a Ruby-based pipeline for natural language processing. Our technology is centered around grammar-based natural language parsing, as well as various product features, and, as the core stack of the company historically is Ruby, the initial version of the pipeline was implemented in Ruby as well.

    As we were entering the exponential growth phase, both technology- and product-wise, we looked into how could we speed up and extend the performance and flexibility of our [meta-]BNF-based parsing engine. Gradually, we built the pieces of the engine in C++.

    Ultimately, the natural language parsing stack spans three universes and three software engineering paradigms: the declarative one, the functional one, and the imperative one. The imperative one was and remains implemented in Ruby, the functional one is implemented in a functional language (this part is under the NDA, while everything I am talking about here is part of the public talks we gave throughout 2017 and 2018), and the declarative part, which can loosely be thought of as being BNF-based, is now served by the C++ engine.

    The C++ engine for the BNF part removed the immediate blockers, gave us 500x+ performance speedup, and enabled us to launch new product features, most notably query completions, suggestions, and spelling corrections.

    See more
    Conor Myhrvold
    Conor Myhrvold
    Tech Brand Mgr, Office of CTO at Uber · | 13 upvotes · 660.1K views
    atUber TechnologiesUber Technologies
    Apache Spark
    Apache Spark
    C#
    C#
    OpenShift
    OpenShift
    JavaScript
    JavaScript
    Kubernetes
    Kubernetes
    C++
    C++
    Go
    Go
    Node.js
    Node.js
    Java
    Java
    Python
    Python
    Jaeger
    Jaeger

    How Uber developed the open source, end-to-end distributed tracing Jaeger , now a CNCF project:

    Distributed tracing is quickly becoming a must-have component in the tools that organizations use to monitor their complex, microservice-based architectures. At Uber, our open source distributed tracing system Jaeger saw large-scale internal adoption throughout 2016, integrated into hundreds of microservices and now recording thousands of traces every second.

    Here is the story of how we got here, from investigating off-the-shelf solutions like Zipkin, to why we switched from pull to push architecture, and how distributed tracing will continue to evolve:

    https://eng.uber.com/distributed-tracing/

    (GitHub Pages : https://www.jaegertracing.io/, GitHub: https://github.com/jaegertracing/jaeger)

    Bindings/Operator: Python Java Node.js Go C++ Kubernetes JavaScript OpenShift C# Apache Spark

    See more
    Go
    Go
    Lua
    Lua
    OpenResty
    OpenResty
    nginx
    nginx
    Logstash
    Logstash
    Prometheus
    Prometheus

    At Kong while building an internal tool, we struggled to route metrics to Prometheus and logs to Logstash without incurring too much latency in our metrics collection.

    We replaced nginx with OpenResty on the edge of our tool which allowed us to use the lua-nginx-module to run Lua code that captures metrics and records telemetry data during every request’s log phase. Our code then pushes the metrics to a local aggregator process (written in Go) which in turn exposes them in Prometheus Exposition Format for consumption by Prometheus. This solution reduced the number of components we needed to maintain and is fast thanks to NGINX and LuaJIT.

    See more
    Martin Lonkwitz
    Martin Lonkwitz
    Software engineering at SVA · | 3 upvotes · 12.9K views
    Java
    Java
    C++
    C++

    Maybe not in everybody focus but I do like programming for @z/OS, @z/Linux and @z/VM with C++ , Java and Assembler . Who else love to dig into control blocks and get a deep dive into system resources to run things in a high valuable way ? And also go all the way up to the application to enlight all the infrastructure features to it ?

    See more
    Rust
    Rust
    C++
    C++

    Initially, I wrote my text adventure game in C++, but I later rewrote my project in Rust. It was an incredibly easier process to use Rust to create a faster, more robust, and bug-free project.

    One difficulty with the C++ language is the lack of safety, helpful error messages, and useful abstractions when compared to languages like Rust. Rust would display a helpful error message at compile time, while C++ would often display "Segmentation fault (core dumped)" or wall of STL errors in the middle. While I would frequently push buggy code to my C++ repository, Rust enabled me to only even submit fully functional code.

    Along with the actual language, Rust also included useful tools such as rustup and cargo to aid in building projects, IDE tooling, managing dependencies, and cross-compiling. This was a refreshing alternative to the difficult CMake and tools of the same nature.

    See more
    Dan Larsen
    Dan Larsen
    CTO at FlowStack · | 7 upvotes · 14.7K views
    atFlowStack ApSFlowStack ApS
    C++
    C++
    C
    C
    Rust
    Rust
    Go
    Go

    At FlowStack we write most of our backend in Go. Go is a well thought out language, with all the right compromises for speedy development of speedy and robust software. It's tooling is part of what makes Go such a great language. Testing and benchmarking is built into the language, in a way that makes it easy to ensure correctness and high performance. In most cases you can get more performance out of Rust and C or C++, but getting everything right is more cumbersome.

    See more
    Interest over time
    Reviews of C++ and Lua
    No reviews found
    How developers use C++ and Lua
    Avatar of papaver
    papaver uses LuaLua

    used lua as gameplay glue while at insomniac. one my favorite wins was integrating table support. it took walking the source code in a debugger to figure it out, still remember being at work at 3am when i got it working finally. (no google back then to make such things simple.)

    Avatar of Marc3842h
    Marc3842h uses C++C++

    C++ is used in Shiro (https://github.com/Marc3842h/shiro).

    C++ is a high performance, low level programming language. Game servers need to run with fast performance to be able to reliably serve players across the globe.

    Avatar of OnlineCity
    OnlineCity uses C++C++

    The most latency sensitive parts are written in C++. Due to our interconnected services architecture, we use either Python or C++ for each service, with the performance critical parts being C++14.

    Avatar of Sine Wave Entertainment
    Sine Wave Entertainment uses LuaLua

    We use Lua as our primary scripting language for third party developers - it's fast, the runtime can be quite small and fits into everywhere it needs to go - from mobile to web.

    Avatar of POROWNEO.PL
    POROWNEO.PL uses C++C++

    Used to write PHP extensions - AZTEC Decoder - License Driver scan - Axis2/C to PHP wrapper and Job-scheduler - Barbershop

    Avatar of Luca Fulchir
    Luca Fulchir uses C++C++

    Performance, zero-overhead abstractions and memory safety of the modern C++ language make this the perfect language for the project.

    Avatar of ApertusVR
    ApertusVR uses C++C++

    The main programming language of ApertusVR. C++11 & CMake provides multi-platform targeting. The architecture is modular.

    Avatar of micro systems
    micro systems uses LuaLua

    Lua is used as the programming language for all extensions and the main business logic.

    Avatar of Dick Cocker
    Dick Cocker uses LuaLua

    Used for hashing client IP in Nginx

    How much does C++ cost?
    How much does Lua cost?
    Pricing unavailable
    Pricing unavailable
    News about C++
    More news