I am a Full stack .NET Developer, I like to work with C#, Asp.Net Core, SQL, Mongo DB, Azure, JavaScript...
Always eager to learn new technologies. I am here to share, ask & eventually learn.
Ignoring frameworks and libraries I would say this:
Ruby is much lighter on syntax than Java and C# so it can be incredibly easy to read.
Ruby is a dynamic scripting language so it is very easy to make changes to anything about your app and see what happens. I make a lot of OSS contributions by just altering a few lines of code in a third party library and seeing if it works.
Objects and functions are both first class concepts in Ruby so you can do both object oriented and functional programming at the same time.
Ruby is a scripting language, so you can use it for everything from a terminal one liner to a business application to microservices.
I am a Full stack .NET Developer, I like to work with C#, Asp.Net Core, SQL, Mongo DB, Azure, JavaScript...
Always eager to learn new technologies. I am here to share, ask & eventually learn.
Thanks, What about performance ? does the performance is well when compared to C#, Java, Python and Go ? I also like to know which server side language is better for making web apps.
I don't know what the comparison is in 2020, but for most business logic and webapp use cases Ruby and Rails is more than fast enough. Usually the biggest speed problem in web apps results from excessive database calls and that is going to be a problem in every language.
I love creating! It started with Lego as a little kid. Later I went on with (dis)assembling my first computer in the early 2000s. Then came the internet... Working remotely for 8 years :-)
I found a nice benchmark a while ago, comparing:
Ruby 2.7 vs. Python 3.8 => in most benchmarks, Ruby is faster
Ruby 2.7 vs. PHP 7.4 => in most benchmarks, PHP is faster
@lud
, what do you mean by "in most benchmarks, Ruby is faster"?? From the same link, I counted 3 (ruby) against 7 (python). Python kinds of win that competition.
And "in most benchmarks, PHP is faster"?? I counted 0 (ruby) against 10 (php). That looks like in all benchmarks
I love creating! It started with Lego as a little kid. Later I went on with (dis)assembling my first computer in the early 2000s. Then came the internet... Working remotely for 8 years :-)
@mcfriend99
"some" in terms of formal logic can include "all". During statistics and formal logic lectures I got that drill, to never say "100%" or "all", but always "most"/"some"/"more than 99%" etc (I am a mathematician, plus English is not my first language, I learned all that logic stuff in German). For a discrete number of objects, that terminology might not necessary, but I just got used to it.
Also, if you scroll to the bottom of the page, you'll notice that this website uses the most recent version of each language, so possibly Ruby was faster in "at least 1" of the specs at the time that I've checked it (it now uses PHP 8, which was not yet released when I wrote my comment).
But honestly, I don't care about if one language wins in 3 out of 5 or 2 out of 7 of whatever. They are all just some isolated benchmarks, which might not reflect reality perfectly. You can write horribly slow code in any language :D
I love creating! It started with Lego as a little kid. Later I went on with (dis)assembling my first computer in the early 2000s. Then came the internet... Working remotely for 8 years :-)
@lud
:D @swiknaba
should tag me, which is my username. Set up an issue ;) github.com/forem/forem
But I am pretty envious, that you got a/"my" three letter username :P
About ruby benchmark, ruby 3 shows to be 3 times faster compared to 2.7.*. My scripts for Linux administration in ruby 3 are way better. Ruby solved performance issues very well, and I am pretty sure it will keep going better. I know few languages, but I am only happy when writing ruby code :)
I love creating! It started with Lego as a little kid. Later I went on with (dis)assembling my first computer in the early 2000s. Then came the internet... Working remotely for 8 years :-)
From the Ruby doc: "Proc objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables."
One thing I'd like to add for those who are put off by dynamically typed languages (scripting languages, usually). There's a project called crystal, which is a statically typed Ruby-based compilable language. So if you wanna learn Ruby but use it in a compiled language, consider crystal. It's still in pretty heavy development, it seems, but I've done some small projects with it. It's a little different, but I like it because of its Ruby syntax. I love Ruby.
There are people that will argue both sides of whether or not Ruby is more readable or maintainable than other languages. I think Ruby and Rails are both best suited for disciplined, sometimes smaller, teams. I think this actually enhances the "designed for happiness" aspect of the language. Here are some of the reasons I find Ruby so enjoyable.
Brevity - syntax is very developer friendly, you can do a lot with a little
Speed - unparalleled developer productivity
Power - it's a very sharp tool that provides power when you need it
Community - top notch people always willing to help and contribute
I agree. Most people I've talked to who don't like Ruby stated they didn't like it because it wasn't easy to read. In my opinion, that's likely because Ruby is not in the C-family of languages and most people are not prepared for that. It took me a little while to break out of that C-lang syntax mode and I'm so glad I stuck with it.
Ruby is consistently OOP from the kernel up. Its ability to do some awesome stuff succinctly and reliably is fun. I just really love Ruby, but it doesn't fit everyone's mold. I suggest that if people find it strange at first but invest the little time it takes to get used to it, they will fall in love with it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is
Ruby
more readable and maintainable thanC#
andJava
, What are its advantages compared toC#
andJava
?Ignoring frameworks and libraries I would say this:
Thanks, What about performance ? does the performance is well when compared to
C#, Java, Python and Go
? I also like to know which server side language is better for making web apps.I don't know what the comparison is in 2020, but for most business logic and webapp use cases Ruby and Rails is more than fast enough. Usually the biggest speed problem in web apps results from excessive database calls and that is going to be a problem in every language.
I found a nice benchmark a while ago, comparing:
Ruby 2.7 vs. Python 3.8 => in most benchmarks, Ruby is faster
Ruby 2.7 vs. PHP 7.4 => in most benchmarks, PHP is faster
source: benchmarksgame-team.pages.debian.n...
I guess almost all compiled languages will have an edge over scripting languages.
blog.iron.io/how-we-went-from-30-s...
I don't think performance is as good as other languages, I consider ruby and python to be slow, developers write code faster though
@lud , what do you mean by "in most benchmarks, Ruby is faster"?? From the same link, I counted 3 (ruby) against 7 (python). Python kinds of win that competition.
And "in most benchmarks, PHP is faster"?? I counted 0 (ruby) against 10 (php). That looks like in all benchmarks
Hi! I am not @lud but @lud :) (this is strange though)
edit: Oh. Looks like it is not possible to tag someone with a capital letter in its name. There is definitely a bug or a dev.to design problem here.
@mcfriend99 "some" in terms of formal logic can include "all". During statistics and formal logic lectures I got that drill, to never say "100%" or "all", but always "most"/"some"/"more than 99%" etc (I am a mathematician, plus English is not my first language, I learned all that logic stuff in German). For a discrete number of objects, that terminology might not necessary, but I just got used to it.
Also, if you scroll to the bottom of the page, you'll notice that this website uses the most recent version of each language, so possibly Ruby was faster in "at least 1" of the specs at the time that I've checked it (it now uses PHP 8, which was not yet released when I wrote my comment).
But honestly, I don't care about if one language wins in 3 out of 5 or 2 out of 7 of whatever. They are all just some isolated benchmarks, which might not reflect reality perfectly. You can write horribly slow code in any language :D
@lud :D @swiknaba should tag me, which is my username. Set up an issue ;) github.com/forem/forem
But I am pretty envious, that you got a/"my" three letter username :P
So it seems that even your username is shown in lowercase in my comment, it tagged you (and not me) successfuly.
About ruby benchmark, ruby 3 shows to be 3 times faster compared to 2.7.*. My scripts for Linux administration in ruby 3 are way better. Ruby solved performance issues very well, and I am pretty sure it will keep going better. I know few languages, but I am only happy when writing ruby code :)
Actually Ruby does not have functions at all. There are all methods.
They are all objects! :D
Procs are functions.
From the Ruby doc: "Proc objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables."
I can also recommend a book patshaughnessy.net/ruby-under-a-mi... that goes greatly to the implementation as well.
One thing I'd like to add for those who are put off by dynamically typed languages (scripting languages, usually). There's a project called crystal, which is a statically typed Ruby-based compilable language. So if you wanna learn Ruby but use it in a compiled language, consider crystal. It's still in pretty heavy development, it seems, but I've done some small projects with it. It's a little different, but I like it because of its Ruby syntax. I love Ruby.
There are people that will argue both sides of whether or not Ruby is more readable or maintainable than other languages. I think Ruby and Rails are both best suited for disciplined, sometimes smaller, teams. I think this actually enhances the "designed for happiness" aspect of the language. Here are some of the reasons I find Ruby so enjoyable.
I agree. Most people I've talked to who don't like Ruby stated they didn't like it because it wasn't easy to read. In my opinion, that's likely because Ruby is not in the C-family of languages and most people are not prepared for that. It took me a little while to break out of that C-lang syntax mode and I'm so glad I stuck with it.
Ruby is consistently OOP from the kernel up. Its ability to do some awesome stuff succinctly and reliably is fun. I just really love Ruby, but it doesn't fit everyone's mold. I suggest that if people find it strange at first but invest the little time it takes to get used to it, they will fall in love with it.