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

C#

56.5K
44K
+ 1
2.1K
Ruby

41K
21.2K
+ 1
4K
Add tool

C# vs Ruby: What are the differences?

Introduction

C# and Ruby are both popular programming languages used in web development, but they have distinct differences. In this article, we will explore the key differences between C# and Ruby.

  1. Syntax: One of the significant differences between C# and Ruby lies in their syntax. C# uses curly braces ({}) and semi-colons (;) to structure and terminate statements, while Ruby uses keywords and indentation. C# has a more rigid syntax, making it a statically-typed language, whereas Ruby has a more flexible syntax, making it dynamically-typed.

  2. Type System: Another difference is their type systems. C# has a strong static type system, which means that variables must be declared with their specific data types, and once declared, the type cannot be changed. On the other hand, Ruby has a dynamic type system, allowing variables to hold any type of data, and their types can be changed dynamically.

  3. Object-Oriented Programming: Both C# and Ruby support object-oriented programming (OOP), but they have different approaches. C# follows a class-based OOP model, where objects are instances of classes, and inheritance is used for code reuse. In contrast, Ruby follows a more flexible and dynamic approach with its module-based OOP model. In Ruby, classes can be modified at runtime, and multiple inheritance is possible through mixins.

  4. Memory Management: C# handles memory management through garbage collection, which automatically deallocates memory that is no longer in use. Ruby, on the other hand, relies on the Ruby interpreter's garbage collector, which uses a mark-and-sweep algorithm to reclaim memory. However, Ruby also provides tools for manual memory management when necessary.

  5. Concurrency: C# has built-in support for multi-threading and concurrent programming through features like tasks and async/await. It also offers fine-grained control over parallel programming with constructs like locks and threads. Ruby, on the other hand, has a global interpreter lock (GIL) that allows only one thread to execute at a time. This can limit the concurrency capabilities of Ruby, although there are libraries and frameworks available to work around this limitation.

  6. Community and Tooling: C# has a larger and more mature community compared to Ruby, as it is widely used in enterprise software development. This translates into a rich ecosystem of libraries, frameworks, and tools for C# developers. Ruby, on the other hand, has a smaller but vibrant community, particularly focused on web development and scripting. Ruby also has its own set of popular frameworks, such as Ruby on Rails, that simplify web development tasks.

In summary, C# and Ruby differ in their syntax, type systems, object-oriented programming models, memory management approaches, concurrency capabilities, and community/tooling support. Understanding these differences is essential for developers when choosing the right language for their specific projects.

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
C#C#JavaScriptJavaScript
and
KotlinKotlin

Hello everybody,

I'm Syed, recently graduated from university. I studied C++ as the first programming language and later I have (a little) experience working with C#. I also have a basic understanding of Kotlin, JavaScript and Python. As of today, I am studying Kotlin from https://developer.android.com/.

Please give me some tips about my career. Which language should I choose in today's modern era? Whether I go with Web development or work on Android app development. Thank you for your assistance.

See more
Replies (1)
Recommends
on
DartDartFlutterFlutterReactReact

Hi Syed, I wish you all the best. I'm an experienced programmer with more than 15 years of experience. Recently in my company, we were trying to hire a MERN Full-Stack developer and we found many who can code in React but few who were capable of thinking logically and actually able to solve the business problem. Learn any language or package, but keep in mind to learn for a goal. Syntaxes don't matter, we hire to achieve goals. Small to medium companies, usually hire full-stack developers due to the lack of resources. So it would be great to learn the following: For Web, I would suggest "React", and for mobile development, "Flutter" comes in handy with lots of promising future. How about learning both? much better but it's all about you. Good luck!

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#F#F#
and
KotlinKotlin

Hi there. I want to expand my coding toolset. So I want to learn a second backend language besides Kotlin. Kotlin is fantastic. I love it in every aspect, and I think I can never return to Java. And also why should I? It is 100% interoperable with java and can co-exist in every project.

So my question here is. Which language do you think will bring me more joy? I think F#; it is more like Kotlin. Then C# (it's more or like 100% java). But, let's say I learn F#. Is it 100% interoperable like Kotlin? can they live side by side? Can I, then, apply to .NET jr jobs after a while, for example, or is C# the holy cow? I would like to learn .Net.

If it is the worst and only C# is acceptable, then which language should I learn? Dart? Go?

See more
Replies (3)
Recommends
on
C#C#KotlinKotlin

Exceptional decision to go with Kotlin. For the other story, go full with C#. "is C# the holy cow? Yes it is.". Specially now when netCore is crossplatform and you can build asp.net core applications on Windows, Linux and macOS via Visual Studio Code which is also multiplatform. Nothing will beat C# in the near future. Also, at the end of 2021 Microsoft will release Net 6.0 which will include MAUI.

"For those new to .NET MAUI (standing for .NET Multi-platform App UI), Microsoft says it's "the evolution of Xamarin.Forms extended from mobile to desktop scenarios with UI controls rebuilt from the ground up for performance and extensibility."

So, C# all the way sire!

See more
Recommends
on
C#C#

animefanx1,

First let's get your questions sorted: Which language do you think will bring me more joy?

This you will have to decide for yourself, I am a long time C# developer and have seen it grow into a very compelling platform. The language and I'd compare it more to Kotlin than Java (by a long margin). More on .NET in a bit.

say I learn F#. Is it 100% interoperable like Kotlin?

You can have 100% interop with a caveat, your F# libraries have to implement certain guidance in order to be referenced from C#. Some (dare I say most) of the differences between F# and C# are predicated on language constructs that are not available in C#. For instance F# functions that return Unit.

can they live side by side?

Yes.

Can I, then, apply to .NET jr jobs after a while, for example, or is C# the holy cow?

I don't know if I take your meaning, but let me say this: Learning either C# or F# will likely force you to understand concepts such as garbage collection, primitive types, etc. which apply to all .NET languages, thus a lot of the effort you put into .NET is bound to pay off regardless of your choice.

If it is the worst and only C# is acceptable, then which language should I learn? Dart? Go? You can't go wrong with any of these and I venture to say whether you select C#, F#, Dart or Go as your next adventure, your willingness to learn will take you to try other languages, some which mey not even exist yet!

PS1: .NET is an end to end environment now. With the introduction of Blazor and Razor pages one does not need JavaScript or other browser scripting languages, it even interops with JavaScript. PS2. Microsoft is working on unifying .NET. Soon there will be only one version: .NET 5! Caveat: Some features such as WinForms will still be specific to the windows environment but all of those are likely things you don't need in Mac or Linux

See more
Recommends
on
GolangGolang

I think you can learn go instead C#. C# is cool, but Golang also cool. It can run on any OS without specific software. C# can run on linux too but it's only the .NET Core as I know. But golang is flexible. So try it and decide what do you think about Golang

See more
Needs advice
on
C#C#JavaScriptJavaScript
and
ReactReact

Hi Everyone,

I have some experience working with JavaScript and React and will now try to learn C# - could you please share some similarities and differences between JS and C# and what rookie mistakes I should watch out for when learning C#?

Also, any tips & good practices are greatly appreciated :)

Thank you

See more
Replies (4)
Pavel Kalugin
Software Engineer at Paralect · | 9 upvotes · 195.2K views

If you want to learn C# to write some backend code you can also check out Node.js which is basically JavaScript running outside the browser. You can create any kind of web servers, APIs, scrapers, automation scripts, etc using all the same JavaScript.

A good entry to Node is Express.js. It is the most common web framework for Node. It's well documented and there are a lot of educational materials for it.

See more
Hameed Moshood
Recommends
on
C#C#

C# is .net framework of a programming language specially different from the programming languages you're used to. If you learn C# you will be experienceed in coding with VIsual Basic .net and also creating web development using ASP and this ASP also include JavaScript function.... I urge you to learn it

See more
Kudos Beluga
Recommends
on
F#F#Node.jsNode.js

I prefer functional programming because it produces less buggy code (thus I recommend F#), and is simply better to learn this paradigm earlier on in your coding career rather than later. It can also do most stuff C# can do, namely code with .NET core. If you're going to learn .NET then you should learn Node.js+Express first though before doing web development with C#/F#

See more
Ross M.
System Architect at MomentFactory · | 2 upvotes · 178.4K views
Recommends
on
C#C#JavaScriptJavaScript

I think you can manage to find something about this topic. it's pretty popular one. ex: https://www.educba.com/c-sharp-vs-js/

Something I don't see discussed enough over the internet is the performance difference. I don't think you should worry about this. 95% of the time you won't notice the difference on your day to day projets. You will know what you need in terms of performance when you get there.

See more
Needs advice
on
C#C#DjangoDjango
and
PythonPython

Hi all, I have been working on the development and automation of construction software using C# and Python. Recently I have started working on Django python web framework and basic frontend for web development. I am really confused to choose between C# and Python to move forward in my career. Seeking your advice on these technologies and their future market value from a career perspective. Thanks,

See more
Replies (3)
ALESSIO SALTARIN
Distinguished IT Architect at IBM · | 10 upvotes · 203.3K views
Recommends
on
C#C#DjangoDjangoPythonPython

In my opinion, a modern developer should have deep knowledge about Object Oriented (OOP) and Functional Programming (FP). The programming language is something that must come later. Any good programmer should be able to switch from one programming language to another easily, if they follow OOP and FP. There are languages, though, that must absolutely be in the portfolio of a modern developer: Java, C#, Python and JavaScript. But be prepared to know also Scala, Kotlin, Swift, Go, Ruby, Rust and TypeScript.

See more
Recommends
on
DjangoDjango

It depends on your preferred career path, if you want to work in start-up/scale-up environments, you probably want to go with a language like Django for the rapid development (fast to production). On the other hand, C# or Java would be better for building long term and large scaled applications, although, Django could certainly achieve this as well. I also want to second that it won't hurt to know both languages, pick your technologies wisely according to the use case, don't stick to a single technology stack. :)

See more
Carlos Iglesias
Recommends

C# and Python are both great languages. With great communities, libraries, frameworks, opportunities. I think it will be the same in a near future.

It’s matter of your likes, and your next jobs.

Dot net core is a little faster on performance. Python more popular with dynamic types. Probably the most lovable language.

See more
Needs advice
on
C#C#
and
GolangGolang

I need some advice to choose a language for back-end development. Right now, my REST APIs were created by using Flask/Django, and I'd like to create a more reliable and more efficient API with static typing. On the one hand, Go is young, very light, and syntax like Python's, but C# has a large number of libs and more built-in methods. Which is the best solution today?

See more
Replies (10)
Recommends
on
C#C#GolangGolang

It depends.

From times to times I asked or was asked that same question. Technology aside, it's important to consider the skills and expertise that the dev team has. Whether you use language A,B or C or framework X,Y and Z, if your team has a strong background and experience with something make it count too.

See more
Recommends
on
GolangGolang
at

I would recommend Go simply because as you mentioned, it's super light. No need to bring in the whole .NET suite to get a simple REST API up and running. Even if your API is a bit complex, Go should be able to handle it.

See more
Bob Bass
President & Full Stack Enginee at Narro, LLC · | 5 upvotes · 262.9K views
Recommends
on
Node.jsNode.jsTypeScriptTypeScript

I started out with C# and .NET and I loved it. In my opinion, it was the perfect way to start learning the fundamentals of software development however I always felt like I was at a disadvantage when I was doing .NET development. Granted, .NET Core is now open-source and cross-platform, but I moved to Node.js simply because it is incredibly popular. I never thought I'd learn to love JavaScript it the way I did with C#, but I learned to love it pretty quickly, especially once I started using TypeScript. You get all of the benefits of C# and JavaScript all in one. If you've built a REST API with Python/Flask/Django, you'll be able to learn Node.js/Express/TypeScript well enough to migrate your API very fast and it's incredibly easy to host for free on any number of services.

I'm new to Go, I've got very little experience but the 'feel' of Go, isn't like Python in my opinion. Go has a pretty steep learning curve, much steeper than C# in my opinion. So if you are willing to consider Node/Express/TypeScript, I think you may really like it. If you're picking between Go and C#, I'd go for C# as of today, but once I am more comfortable with Go (which I anticipate being a slow process) I may change my mind.

At this moment in time, in late 2020- Node/Express/TypeScript feels like the obvious choice to me as a former C# developer.

See more
Vadim Bauer
Recommends
on
PythonPython

The best language for you is the one that you know best!

Its a bit of a guess, but from your question and the difficulties you have with Python it seems to me the problem you describe is the manifestation of a bad design/architecture/code quality. These are not the problems of a language itself!

The experience you gained over the past years with your current programming language will outmatch any benefits of another language that you start from zero.

Because in the end of the day languages aren't all that different when it comes to fullfil the same task, it's more the tools, framework and ecosystem for a particular problem that make a difference.

I worked with Java, C#, Go and recently in Phyton, and I would choose Phyton over Go for WebApps, even I like compiled languages more. Go is a very simple language, I would even say maybe too simple. I can't stand all those go boilerplate if err checks, the broken filesystem, the date/time mess and many more things that aren't actually relevant for business application at all. Go has its advantages but not for WebApps.

Keep the lang and improve your skills and architecture you will benifit more from it than from a new language.

See more
Recommends
on
GolangGolang

I recommend Go for backend. It's younger than C# doesn't mean it's not mature. It's already mature enough to be run on production. You can see there are already many companies in the world adopting Go as their backend business logic or tooling. I can name a few like Github, Shopify, uber, twitch, and many more. It's easier learning curve, low entry barrier, better performance than C#, better memory consumption than C#, since there's no VM/runtime needed. It's suitable for large scale system and large codebase for readibility and long maintainability. It's simpler than C# since no class, inheritance(this can cause hard to maintain software), exception, etc. You can still implement OO way in Go without those feature. Simple file structure, only main files and package files. It compiles to single binary and easy to deploy and work around it, unlike C# who compiled to IL and you need to wrap all those IL files to be run inside separated web server(even .Net/.Net Core platform provide built-in web server). For libs, don't worry, there are many open source libs you will found on Github and already adopted by many companies. Go is employed in personal, startup, even corporate level.

See more
Recommends
on
GolangGolang
Go now, C# later

I suggest Go because it has a simple and clean ecosystem. The language is simple. You don’t need complex configs or installs either. You’ll be up and running very quickly. It doesn’t have as much as .NET but its standard library is more than sufficient for RESTful APIs. Concurrency is much, much easier too.

C# I’d definitely recommend later on. The .NET framework, especially core, is extremely powerful and there’s little you can’t build with it. Go won’t take you long to be productive with.

See more
Recommends
on
C#C#

I have some systems on production using both languages. I tend to use golang if the API is small or medium size, but if I am going to build a large system definitively I use c#(asp netcore).

See more
Ted Elliott
Recommends
on
fastapifastapipydanticpydantic

If you want to stick with python you may want to consider Fastapi. It uses Pydantic to give you strongly typed models and validation. It generates openapi docs for you out of the box. They have good documentation as well and they claim it is really fast.

See more
Alexander Krylkov
Sofrware Architect at Air Astana · | 1 upvotes · 262.9K views
Recommends
on
C#C#

I would recommend C#, particularly Simplify.Web web-framework. C# is easy to start with (especially .NET Core). Simplify.Web is also easy to start with, no extra setup required for simple API, but on the other hand you have power of C# and full control over your API with ability to extend.

See more
Carlos Iglesias
Recommends

The database your are going to connect and the needed libraries could decide. Because both are awesome languages.

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
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
Erik Ralston
Chief Architect at LiveTiles · | 14 upvotes · 547.5K views

C# and .Net were obvious choices for us at LiveTiles given our investment in the Microsoft ecosystem. It enabled us to harness of the .Net framework to build ASP.Net MVC, WebAPI, and Serverless applications very easily. Coupled with the high productivity of Visual Studio, it's the native tongue of Microsoft technology.

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
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of C#
Pros of Ruby
  • 351
    Cool syntax
  • 292
    Great lambda support
  • 264
    Great generics support
  • 210
    Language integrated query (linq)
  • 180
    Extension methods
  • 94
    Automatic garbage collection
  • 89
    Properties with get/set methods
  • 83
    Backed by microsoft
  • 71
    Automatic memory management
  • 61
    Amaizing Crossplatform Support
  • 46
    High performance
  • 42
    LINQ
  • 37
    Beautiful
  • 34
    Great ecosystem of community packages with Nuget
  • 26
    Vibrant developer community
  • 23
    Great readability
  • 21
    Dead-simple asynchronous programming with async/await
  • 19
    Visual Studio - Great IDE
  • 17
    Open source
  • 16
    Productive
  • 15
    Strongly typed by default, dynamic typing when needed
  • 15
    Object oriented programming paradigm
  • 12
    Easy separation of config/application code
  • 11
    Great community
  • 10
    OOPS simplified with great syntax
  • 9
    Cool
  • 9
    Operator overloading
  • 8
    Good language to teach OO concepts
  • 8
    Events management using delegates
  • 8
    High-performance
  • 7
    Linq expressions
  • 7
    Unity
  • 6
    Conditional compilation
  • 6
    Coherent language backed by an extensive CLR
  • 5
    Top level code
  • 5
    Comprehensive platform libraries
  • 5
    Organized and clean
  • 4
    Concise syntax, productivity designed
  • 3
    Lovely
  • 2
    Statically typed
  • 1
    Sophisticated overall
  • 1
    Far more sleek and sphisticated than other languages
  • 1
    Interfaces
  • 0
    Interfaces
  • 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
  • 15
    Poor x-platform GUI support
  • 8
    Closed source
  • 7
    Fast and secure
  • 7
    Requires DllImportAttribute for getting stuff from unma
  • 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# (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.

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

Nov 20 2019 at 3:38AM

OneSignal

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

AppSignal

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

AppSignal

RedisRubyKafka+9
15
1634
GitHubDockerReact+17
40
36168
What are some alternatives to C# and Ruby?
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!
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.
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.
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 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