1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

How Does Ruby Compare to Perl?

By

A Philosophical Divide

Though they can be used for the same purposes, Ruby and Perl couldn't be more different. There is an underlying philosophical difference that creates an uncrossable rift between them. One of Perl's guiding concepts is "there is more than one way to do it" (often shortened as TIMTOWTDI).

Perl's Flexible Design

Perl was designed to provide as many paradigms, tools and language features as possible to programmers, including those which may not be used now, but might prove useful in the future. For example, among other ways, Perl can be used as a normal imperative language like BASIC, a structured language like C, a clone of the AWK text processing language, a functional language something like Lisp or as an object oriented language.

The Ruby Way

In contrast to Perl's TIMTOWTDI perspective, a phrase often heard in the Ruby community is "the Ruby way." Not quite a rigid set of rules, "the Ruby way" is a set of conventions used by Ruby programmers to explain the natural way of doing things with Ruby.

Most programmers only use one paradigm and having so many unused features tends to confuse things. Unlike Perl, Ruby was designed as an object-oriented language. While it does incorporate some non-object oriented features, they were included because they were deemed useful at the time, not because they might be useful down the line.

  1. About.com
  2. Technology
  3. Ruby
  4. Beginning Ruby
  5. How Does Ruby Compare to Perl?

©2014 About.com. All rights reserved.