LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Lisp, Ruby, or python (https://www.linuxquestions.org/questions/programming-9/lisp-ruby-or-python-698998/)

nesrail 01-21-2009 07:24 PM

Lisp, Ruby, or python
 
I been looking at the three languages (PERL, ruby and python).
I read about the languages at their sites but I didn't get a clear picture of the differences between the three languages.

Which language is worth learning and why?
What are the differences???

thanks.

(Not LISP but PERL) sorry

Sergei Steshenko 01-21-2009 08:50 PM

Quote:

Originally Posted by nesrail (Post 3416793)
I been looking at the three languages (PERL, ruby and python).
I read about the languages at their sites but I didn't get a clear picture of the differences between the three languages.

Which language is worth learning and why?
What are the differences???

thanks.

(Not LISP but PERL) sorry

Scoping, anonymity. Perl is the champion IMO.

wje_lq 01-21-2009 09:07 PM

This is one occasion where searching the web comes in handy.

I don't use python or ruby. I do use Perl. I'm not sure that's something I should brag about.

One big advantage of Perl is that there are many, many different ways of doing something. This means that you get to pick the way that makes most sense to you.

One big disadvantage of Perl is that there are many, many different ways of doing something. This means that if you are hired to maintain someone else's Perl scripts, you have to learn not only the ways of doing things that appeal to you, but all the other ways as well.

Me? I'd vote for lisp. (:>)

Sergei Steshenko 01-21-2009 09:43 PM

Here is a nice article on scoping: http://en.wikipedia.org/wiki/Scope_(programming) .

taylor_venable 01-22-2009 04:39 AM

Quote:

Originally Posted by nesrail (Post 3416793)
(Not LISP but PERL) sorry

You should learn Lisp anyway.

All three are worth learning. To list the differences between them would be a pedagogical act born in futility. Like the Matrix, you cannot simply be told the differences between what it is like to work in different languages, you have to experience it yourself. Kinda like you could read a book on programming in X but until you actually write X code it's not very useful. So in short you'll have to learn all three to get the most out of it.

I learned them in the order of Perl, then Python, then Ruby. I have no idea if that's "good" or not. Lexicographic seems as helpful as any other order.

Sergei Steshenko 01-22-2009 05:46 AM

Quote:

Originally Posted by taylor_venable (Post 3417146)
You should learn Lisp anyway.

All three are worth learning. To list the differences between them would be a pedagogical act born in futility. Like the Matrix, you cannot simply be told the differences between what it is like to work in different languages, you have to experience it yourself. Kinda like you could read a book on programming in X but until you actually write X code it's not very useful. So in short you'll have to learn all three to get the most out of it.

I learned them in the order of Perl, then Python, then Ruby. I have no idea if that's "good" or not. Lexicographic seems as helpful as any other order.

AFAIK Ruby is both slower and cleaner - the latter WRT OO.

Su-Shee 01-22-2009 02:05 PM

Depends on your needs and personal preferences. I suggest to do some stuff in Perl and Python and developing your own taste.

The strength of Perl is: CPAN, well developed Unicode support, excellent and extensive and very well written documentation, security, speed and "the Perl culture" of "There's more than one way to do it" around it.

Many people see Perl's way of doing object oriented programming as its weakness, hate the Perl syntax and consider it cluttered and difficult to read and dislike "the Perl culture" around it - especially the "there's more than one way to do it". As Perl 6 isn't entirely finished yet, some people think of Perl as "outdated", "old-fashioned" or "obsolete".

Those people usally prefer Ruby or Python due to their object orientation and a more strict programming culture of "This is the proper way to do X" and consider Ruby and especially Python the more "clean" programming languages.

Python has a handful of very nice toolkits and library collections (natural language toolkit or twisted for example) and as far as I know the better Qt-support compared to Perl.

I still prefer Perl over Ruby or Python - I simply never had any need or occurence to use Ruby or Python extensively instead of Perl and I hate not having something like CPAN and I'm totally in love with upcoming Perl 6 - after that, I'm going have even less occasion to consider Python and Ruby as an alternative.

indienick 01-22-2009 03:14 PM

Quote:

Originally Posted by wje_lq (Post 3416872)
Me? I'd vote for lisp. (:>)

I second that vote! I got all intrigued when I saw the title for this thread.

I find Perl a bit...messy. Just my personal opinion; not intended as flame bait. I used to program in Perl, but then I switched over to (Common) Lisp for my needs and haven't looked back.

Ruby and Python never really cut it for me - they're both neat languages, they just don't leave much to the imagination (especially in Python's motto: there's only one way to do it). Both would make great beginner languages - a hell of a lot better than the QBASIC I was taught in high-school - but I would like to think that I have moved past the point of easy-to-learn, commonplace languages.

rweaver 01-22-2009 03:48 PM

Quote:

Originally Posted by nesrail (Post 3416793)
I been looking at the three languages (PERL, ruby and python).
I read about the languages at their sites but I didn't get a clear picture of the differences between the three languages.

Which language is worth learning and why?
What are the differences???

thanks.

(Not LISP but PERL) sorry

In the grand scope all languages can do the same things at some level.

I think the biggest deciding factor would be what do you want to do with the language? Are you looking at doing things at the prompt? Are you making web apps? Do you plan on working with some kind of application framework? Are you looking for rapid application development? Are you interested in a strict language or a more free form language? etc, etc, etc.

For general usage across everything, I'd give the hat to perl. In general its the most mature of the 3 languages.

However, if I were designing a web application within a framework I'd serious be looking at ruby so I could later work with rails easily.

wje_lq 01-22-2009 04:13 PM

Quote:

For general usage across everything, I'd give the hat to perl. In general its the most mature of the 3 languages.
It is not for nothing that Perl is known as the Swiss Army chainsaw of programming languages.

burschik 01-23-2009 05:59 AM

Definitely LISP, even if it was a typo.

Sergei Steshenko 01-23-2009 06:17 AM

Quote:

Originally Posted by burschik (Post 3418459)
Definitely LISP, even if it was a typo.

Is there something in LISP which can't be done in Perl ?

I do not know LISP, but I know Perl borrowed some features from LISP.

indienick 01-23-2009 07:41 AM

Self-generating code (macros)? Functions that re-define themselves (might seem esoteric, but still has a use, somewhere)? Portable pathnames?

There's three things, for sure.

http://www.xkcd.com/224/
http://www.xkcd.com/297/

rweaver 01-23-2009 08:04 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3418467)
Is there something in LISP which can't be done in Perl ?

I do not know LISP, but I know Perl borrowed some features from LISP.

No. That being said, a key point to remember is this... *anything* can be done in *any* programming language. It's just a matter of complexity. There are things you can do in lisp easily that are more complex to do in Perl, sometimes because they're not native to the language, sometimes because they're just a pain in the backside.

Programming languages are not defined by what you can do in them specifically, but rather by what they let you do *easily*.

burschik 01-23-2009 08:06 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3418467)
Is there something in LISP which can't be done in Perl ?

I do not know LISP, but I know Perl borrowed some features from LISP.

Macros. But the main thing about the LISP family of languages is their elegance. Not everybody appreciates that, but some do, and their life is transformed.


All times are GMT -5. The time now is 05:39 AM.