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

C++

17.5K
9.1K
+ 1
842
Ruby

44.9K
21.2K
+ 1
4K
Add tool

C++ vs Ruby: What are the differences?

Key Differences between C++ and Ruby

  1. Memory Management: One of the major differences between C++ and Ruby lies in their memory management approach. In C++, developers have to manually manage memory using concepts like new and delete, which can lead to memory leaks and other low-level errors. On the other hand, Ruby uses automatic garbage collection, where the memory is managed by the interpreter itself, relieving developers from the burden of memory management.

  2. Type System: C++ has a static type system, which means that variables must be declared with their types, and these types are checked at compile-time. This provides better performance and allows for more efficient memory usage. Conversely, Ruby has a dynamic type system, allowing variables to be assigned to different types at runtime. While this provides flexibility, it can also make debugging more challenging.

  3. Syntax and Readability: C++ tends to have a more complex syntax compared to Ruby, which is known for its simplicity and elegance. C++ often requires more boilerplate code and explicit syntax for tasks like string manipulation or file I/O. Conversely, Ruby focuses on readability, utilizing a more concise and human-friendly syntax, which makes it easier to understand and write code quickly.

  4. Concurrency and Parallelism: C++ has better support for low-level concurrency and parallelism, as it allows for direct access to threads and low-level synchronization mechanisms like mutexes and condition variables. In contrast, Ruby has limited built-in support for concurrency and parallelism due to its interpreter-based nature. However, Ruby provides abstractions like fibers and the ability to leverage external libraries to achieve concurrency.

  5. Performance: C++ is often considered a faster language than Ruby due to its direct compilation to machine code and static typing. C++ programs can be highly optimized and offer better performance in scenarios where speed is critical, such as system programming or performance-sensitive applications. Ruby, being an interpreted language, often has a performance overhead and is better suited for rapid prototyping and web development.

  6. Community and Ecosystem: C++ has a long-established and robust community with a wide range of libraries, frameworks, and tools available. It is widely used in industries like gaming, embedded systems, and high-performance computing. Ruby, on the other hand, has a smaller community but is known for its supportive and passionate community. It shines in web development and has a rich ecosystem with powerful frameworks like Ruby on Rails.

In summary, C++ provides more control over memory management, has a static type system, and offers better low-level performance, while Ruby focuses on simplicity, readability, and rapid development. Both languages have their strengths and are suited for different use cases based on the specific needs of a project.

Advice on C++ and Ruby
Caue Carvalho
Needs advice
on
GolangGolangPythonPython
and
RubyRuby

Hello!

I'm a developer for over 9 years, and most of this time I've been working with C# and it is paying my bills until nowadays. But I'm seeking to learn other languages and expand the possibilities for the next years.

Now the question... I know Ruby is far from dead but is it still worth investing time in learning it? Or would be better to take Python, Golang, or even Rust? Or maybe another language.

Thanks in advance.

See more
Replies (8)
Angel Ramirez
Recommends
on
GolangGolangPythonPython
at

Hi Caue, I don't think any language is dead in 2022, and we still see a lot of Cobol and Fortran out there, so Ruby is not going to die for sure. However, based on the market, you'll be better off learning Goland and Python. For example, for data science, machine learning, and similar areas, Python is the default language while backend API, services, and other general purpose Goland is becoming the preferred.

I hope this helps.

See more
Recommends
on
GolangGolangPythonPython

I feel most productive using go. It has all the features I need and doesn't throw road blocks in your way as you learn. Rust is the most difficult to learn as borrow checking and other features can puzzle a newcomer for days. Python is a logical next step as it has a huge following, many great libraries, and one can find a gig using python in a heartbeat. Ruby isn't awful, it's just not that popular as the others.

Another reason to use python is that it is not compiled. You can muck around in the interpreter until you figure things out. OTOH, that makes it less performant. You really need to think about your use cases, your interest in lower-lever versus high-level coding, and so on.

See more
Roman Glushko
Machine Learning, Software Engineering and Life · | 4 upvotes · 58.1K views
Recommends
on
GolangGolangPythonPythonRustRust

I enjoy coding in Python. I think it's minimalistic and readable syntax and lang features are just unparalleled. They are perfect for prototyping and for the software engineering in general. If I'm not wrong Gitlab marked Python as #2 popular language after JavaScript. Beyond that, Python ecosystem and areas of usage are enormous. In areas like ML/DL, it's important to know Python to leverage variety of existing tools and frameworks.

Then, I have learned and worked with Golang. I use it where I think I would need a slightly better performance than in Python. Plus, relatively small and self-contained executable is a great thing to have. If you plan to write distributed systems, extend Kubernetes or do similar things I think Golang is a great choice. It's also simple and straightforward, especially when you want to do effective multithreading. Although I don't like that Golang is more low-level than Python. Sometimes I feel like I need to implement myself too much things.

Now, about Rust. It's my second try to learn Rust. First time I decided to learn Golang as I understood it in 30mins or so while I was struggling to compile/do anything meaningful there for quite a bit. So I personally don't think Rust is super easy. I have got back to learning Rust as it's going to fill one of gaps in my problem solving toolkit - let me write low-level system programs (e.g. linux kernel modules). I don't want to learn "obsolete" C/C++ (my reasons are similar to why Google has recently introduced Carbon - a replacement for C/C++ codebases). If you are not going to tight your life with system-like programming, Rust may be an overkill for you.

Finally, I have never coded in Ruby, so are not going to comment it.

See more
Recommends

I'm almost same position as you. 8 years same company with c#. I tried both Python and Golang. I like working with Golang. Check this litte go doc. After reading this document and following its examples, I decided to work with "go" https://www.openmymind.net/assets/go/go.pdf

See more
Recommends
at

Since you are very experienced, picking up a language will not take you more than a week. Rust is a very new language. Many startups are still experimenting with it. Golang is very popular nowadays. You can see a lot of golang jobs in the market. The best part is, compiled code is single binary and has a minimal footprint. Rails is a compelling framework; believe me, many websites like Shopify, GitHub, GitLab, etc., are powered by the rails framework. You can also leverage the power of metaprogramming in Ruby. Python is memory and CPU intensive. It is not as performant as the other three. If you want to go into Data Science, Python is the language. Good luck, buddy. Feel free to connect with me: https://twitter.com/avirajkhare00

See more
Recommends
on
PythonPython

Because it opens endless possibilities you can do anything and everything you want to. from ai to app development to web development.

See more
Recommends
on
GolangGolangPythonPythonRubyRuby

it is highly recommended to take a look at that survey

https://survey.stackoverflow.co/2022/

See more
A Nielsen
Fullstack Dev at ADTELA · | 1 upvotes · 54.7K views
Recommends
on
GolangGolangPythonPython

Either Python or Golang, for all the enlightened reasons already mentionned in all advices/comments :) Enjoy!

See more
Needs advice
on
AngularJSAngularJSC++C++
and
JavaJava

I will use Elixir for personal projects. It's productive, reliable, secure, simple, etc. But when performance is critical, I need job opportunities, when I work with mutability, which do I pick? I need advice on which "bureaucratic, mainstream" programming language to pick when wanting performance and jobs. Elixir is often "slow", and it hasn't boomed yet the way Golang and Rust have, so which?

See more
Replies (1)
FREDRICK OLUOCH
Lead Software Developer at Blaqueyard · | 3 upvotes · 54.5K views
Recommends
on
ElixirElixirRustRust
at

Well for those performant tasks maybe you can use Rust nifs for elixir. Elixir enables to write fault-tolerant, scalable code for concurrent systems, and as such, it is perfect for messaging systems and web applications that might need to handle a lot of users efficiently. But if you need speed you can plug in Rust or write a microservice using Goland/Rust.

See more
Youcef Benamare
Needs advice
on
C langC langC++C++
and
C#C#

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 (2)
Richard Rios
Senior Software Engineer · | 5 upvotes · 134.6K views
Recommends
on
C langC lang

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], 
    pasword[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"); 
    } 
    else 
    { 
        printf("finde name"); 
    }
}
See more
Recommends
on
C langC lang

Dear, Yusuf You can't use if statement to compare two strings, but you can use strcmp() function which means string compare The behavior of strcmp function is: If (string1 < string2)? Then: return a negative value. If (string1 > string2)? Then: return a positive value.

If(string1 == string2)? Then: return (0).

So, you can modify this statment to: if(strcmp(name,"Yousef") != 0) printf("name undefined\n");

else printf("find name");

But, In this case there is one logic problem that (strcmp) function don't ignore the letter case. For example: If you input name : yousef

The first letter here (y) is small, but in the comparing statement above is capital, So the result will be "name undefined", but in fact "yousef" = "Yousef".

To solve this problem you should use stracasecmp() function. This function ignore the letter case while comparing. The code will be: if(strcasecmp(name,"Yousef") != 0) printf("name undefined\n");

else printf("find name");

Attention: Include string libreary after using these functions to skip any problem may be found.

include

may Allah bless you ^_^

See more
Needs advice
on
C++C++JavaScriptJavaScript
and
PythonPython

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 (3)
Pat Fitzner
Recommends
on
PythonPython

Although Lua is a very simple,efficient, elegant and welcoming language, Python is extremely versatile. Therefore, if you want to get into programming without a defined direction, Python is the way to go. It has a lot of libraries, the ability to do anything and it is closer to other languages than Lua is (yeah I know about Lua and C, but from a learner's point of view, it makes sense). Additionally, Python will be a marketable skill, but I for one have not yet seen job offers for Lua devs.

See more
Recommends
on
C langC langC++C++C#C#JavaJava

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 · 194.5K views
Recommends

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 ASP.net 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
on
C++C++JavaScriptJavaScript
and
PythonPython

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 · 228.1K views
Recommends
on
PythonPython

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!

https://www.w3schools.com/ 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 https://roadmap.sh/frontend

See more
Recommends
on
JavaScriptJavaScript

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
Mukesh Gurpude
Recommends
on
JavaScriptJavaScriptPythonPython

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
Recommends
on
JavaScriptJavaScript

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
Recommends
on
FlaskFlaskPythonPython

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
John Akhilomen
Recommends
on
JavaScriptJavaScriptPythonPython

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
Recommends
on
WordPressWordPress

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
Decisions about C++ and Ruby
Mark Esser
Team Lead Talent Acquisition at i22 Digitalagentur GmbH · | 8 upvotes · 100.9K views

A developer and project manager from our team X says the following about our use of Rails at i22:

"We use Rails to build stable and flexible backend systems. Rails is extremely good for managing data structures and quickly setting up new systems. It is the perfect base for most use cases."

I asked the same Team X member why the team prefers to work with Ruby on Rails, rather than Python and Django:

"Because Python is a scripting language and from my point of view not suitable for building stable web services. Python is for me rather good for scripts and fast small tools. Not for stable business applications. And if I want it fast I prefer Go."

See more
Alexandre Desroches
Founder & Developper at Finance D · | 71 upvotes · 339K 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
Ing. Alvaro Rodríguez Scelza
Software Systems Engineer at Ripio · | 12 upvotes · 353.9K views

I was considering focusing on learning RoR and looking for a work that uses those techs.

After some investigation, I decided to stay with C# .NET:

  • It is more requested on job positions (7 to 1 in my personal searches average).

  • It's been around for longer.

  • it has better documentation and community.

  • One of Ruby advantages (its amazing community gems, that allows to quickly build parts of your systems by merely putting together third party components) gets quite complicated to use and maintain in huge applications, where building and reusing your own components may become a better approach.

  • Rail's front end support is starting to waver.

  • C# .NET code is far easier to understand, debug and maintain. Although certainly not easier to learn from scratch.

  • Though Rails has an excellent programming speed, C# tends to get the upper hand in long term projects.

I would avise to stick to rails when building small projects, and switching to C# for more long term ones.

Opinions are welcome!

See more
Timm Stelzer
VP Of Engineering at Flexperto GmbH · | 18 upvotes · 601.1K views

We have a lot of experience in JavaScript, writing our services in NodeJS allows developers to transition to the back end without any friction, without having to learn a new language. There is also the option to write services in TypeScript, which adds an expressive type layer. The semi-shared ecosystem between front and back end is nice as well, though specifically NodeJS libraries sometimes suffer in quality, compared to other major languages.

As for why we didn't pick the other languages, most of it comes down to "personal preference" and historically grown code bases, but let's do some post-hoc deduction:

Go is a practical choice, reasonably easy to learn, but until we find performance issues with our NodeJS stack, there is simply no reason to switch. The benefits of using NodeJS so far outweigh those of picking Go. This might change in the future.

PHP is a language we're still using in big parts of our system, and are still sometimes writing new code in. Modern PHP has fixed some of its issues, and probably has the fastest development cycle time, but it suffers around modelling complex asynchronous tasks, and (on a personal note) lack of support for writing in a functional style.

We don't use Python, Elixir or Ruby, mostly because of personal preference and for historic reasons.

Rust, though I personally love and use it in my projects, would require us to specifically hire for that, as the learning curve is quite steep. Its web ecosystem is OK by now (see https://www.arewewebyet.org/), but in my opinion, it is still no where near that of the other web languages. In other words, we are not willing to pay the price for playing this innovation card.

Haskell, as with Rust, I personally adore, but is simply too esoteric for us. There are problem domains where it shines, ours is not one of them.

See more
Andrew Carpenter
Chief Software Architect at Xelex Digital, LLC · | 16 upvotes · 399.1K views

In 2015 as Xelex Digital was paving a new technology path, moving from ASP.NET web services and web applications, we knew that we wanted to move to a more modular decoupled base of applications centered around REST APIs.

To that end we spent several months studying API design patterns and decided to use our own adaptation of CRUD, specifically a SCRUD pattern that elevates query params to a more central role via the Search action.

Once we nailed down the API design pattern it was time to decide what language(s) our new APIs would be built upon. Our team has always been driven by the right tool for the job rather than what we know best. That said, in balancing practicality we chose to focus on 3 options that our team had deep experience with and knew the pros and cons of.

For us it came down to C#, JavaScript, and Ruby. At the time we owned our infrastructure, racks in cages, that were all loaded with Windows. We were also at a point that we were using that infrastructure to it's fullest and could not afford additional servers running Linux. That's a long way of saying we decided against Ruby as it doesn't play nice on Windows.

That left us with two options. We went a very unconventional route for deciding between the two. We built MVP APIs on both. The interfaces were identical and interchangeable. What we found was easily quantifiable differences.

We were able to iterate on our Node based APIs much more rapidly than we were our C# APIs. For us this was owed to the community coupled with the extremely dynamic nature of JS. There were tradeoffs we considered, latency was (acceptably) higher on requests to our Node APIs. No strong types to protect us from ourselves, but we've rarely found that to be an issue.

As such we decided to commit resources to our Node APIs and push it out as the core brain of our new system. We haven't looked back since. It has consistently met our needs, scaling with us, getting better with time as continually pour into and expand our capabilities.

See more
Thomas Miller
Talent Co-Ordinator at Tessian · | 16 upvotes · 226.7K views

In December we successfully flipped around half a billion monthly API requests from our Ruby on Rails application to some new Python 3 applications. Our Head of Engineering has written a great article as to why we decided to transition from Ruby on Rails to Python 3! Read more about it in the link below.

See more
Mike Fiedler
Enterprise Architect at Warby Parker · | 3 upvotes · 217.9K views

When I was evaluating languages to write this app in, I considered either Python or JavaScript at the time. I find Ruby very pleasant to read and write, and the Ruby community has built out a wide variety of test tools and approaches, helping e deliver better software faster. Along with Rails, and the Ruby-first Heroku support, this was an easy decision.

See more
Russtopia Labs
Sr. Doodad Imagineer at Russtopia Labs · | 0 upvote · 197.1K 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%

https://gogs.blitter.com/RLabs/xs

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of C++
Pros of Ruby
  • 200
    Performance
  • 106
    Control over memory allocation
  • 97
    Cross-platform
  • 95
    Fast
  • 84
    Object oriented
  • 57
    Industry standard
  • 47
    Smart pointers
  • 37
    Templates
  • 16
    Gui toolkits
  • 16
    Raii
  • 13
    Generic programming
  • 13
    Control
  • 13
    Flexibility
  • 11
    Metaprogramming
  • 9
    Hardcore
  • 5
    Simple
  • 5
    Full-fledged containers/collections API
  • 5
    Many large libraries
  • 4
    Performant multi-paradigm language
  • 4
    Large number of Libraries
  • 3
    Way too complicated
  • 1
    Close to Reality
  • 1
    Plenty of useful features
  • 605
    Programme friendly
  • 536
    Quick to develop
  • 490
    Great community
  • 468
    Productivity
  • 432
    Simplicity
  • 273
    Open source
  • 234
    Meta-programming
  • 207
    Powerful
  • 156
    Blocks
  • 139
    Powerful one-liners
  • 69
    Flexible
  • 58
    Easy to learn
  • 51
    Easy to start
  • 42
    Maintainability
  • 37
    Lambdas
  • 30
    Procs
  • 21
    Fun to write
  • 19
    Diverse web frameworks
  • 13
    Reads like English
  • 10
    Makes me smarter and happier
  • 9
    Rails
  • 8
    Very Dynamic
  • 8
    Elegant syntax
  • 6
    Matz
  • 5
    Object Oriented
  • 5
    Programmer happiness
  • 4
    Elegant code
  • 4
    Generally fun but makes you wanna cry sometimes
  • 4
    Friendly
  • 4
    Fun and useful
  • 3
    Easy packaging and modules
  • 3
    There are so many ways to make it do what you want
  • 2
    Primitive types can be tampered with

Sign up to add or upvote prosMake informed product decisions

Cons of C++
Cons of Ruby
  • 8
    Slow compilation
  • 8
    Unsafe
  • 6
    Over-complicated
  • 6
    Fragile ABI
  • 5
    No standard/mainstream dependency management
  • 4
    Templates mess with compilation units
  • 3
    Too low level for most tasks
  • 1
    Compile time features are a mess
  • 1
    Template metaprogramming is insane
  • 1
    Segfaults
  • 1
    Unreal engine
  • 7
    Memory hog
  • 7
    Really slow if you're not really careful
  • 3
    Nested Blocks can make code unreadable
  • 2
    Encouraging imperative programming
  • 1
    Ambiguous Syntax, such as function parentheses

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 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.

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

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

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

What tools integrate with C++?
What tools integrate with Ruby?

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

Blog Posts

May 6 2020 at 6:34AM

Pinterest

JavaScriptC++Varnish+6
7
3353
Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4626
Oct 24 2019 at 7:43PM

AppSignal

JavaScriptNode.jsJava+8
5
947
Jun 6 2019 at 5:11PM

AppSignal

RedisRubyKafka+9
15
1633
GitHubDockerReact+17
40
36146
What are some alternatives to C++ and Ruby?
C lang
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.
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.
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.
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.
See all alternatives