I am a beginner like you.
I started to use Ruby one month ago and my priority was
making short scripts for Linux system administration and
controlling the BeagleBone Black.
I must say in this respect Ruby really rocks, these are my arguments about it:
-] It has a REPL that is part of the language (irb) [Perl does not, Python does]
-] It has great features from Perl: builtin regexp, powerful string quoting %q, %Q, nice
string interpolation, clean way to call other shell programs : ` ` .
[Perl has, Python has but IMHO not so practical to use ]
-] You can write long numbers as "100_00_123_4_56", so, you can use Ruby as a pocket calculator, I need it a lot of times. [ Perl has, but it is not born to be used in a REPL,
Python has it only from release 3.6 (i guess) ]
-] As easy to read as Python. But in Ruby you can write your logic in a single line, in Python not. So, good for one-liners. [ Perl is not so nice to read, but rocks in one-liners ]
-] Ruby uses Scheme way of designing methods that return booeleans (with "?") and methods that are destructive(with "!") [ Perl does not, Python does not ]
-] As in Lisp each time you run a "statement" you get a value back. This is very
good, I appreciate it. [ Python does not do it always (AFAIRemember), and Perl,
what it returns it depends on what it expects ]
-] In general, if you know other programming languages you will see
Ruby tries to take the best from each one of them. And, IMHO it succedes.
Given that, I will write all code I was writing in Python, Perl, Bash in Ruby from
now on. Because I think it is a very clean and comprehensive generale purpose tool.
On 14/11/2017 08:21, Surya Poojary wrote:
I'm a beginner who is trying to learn Ruby. I have noticed how people always link rails to ruby,I'm sure it's one hell of a framework and does boosts Ruby's popularity.But I wanted to know if ruby can hold its own against other languages if there is no rails.
Just a question from a newbie.