Ruby (programming language): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
No edit summary
imported>Pat Palmer
No edit summary
Line 1: Line 1:
{{subpages9}}
{{subpages9}}
'''Ruby''' is a general-purpose [[computer]] [[programming language]] made available as an open-source project in 1995 by its creator, [[Yukihiro Matsumoto]] (commonly called ''Matz'').  Matz, a Japanese computer professional who had experience in creating open-source software and had developed a familiarity with a wide variety of programming languages, has closely managed Ruby releases in the years since it first appeared.  By 2007, Ruby had risen to be tenth in usage among all programming languages, and its use is still growing<ref name="tiobe">
'''Ruby''' is a general-purpose [[computer]] [[programming language]] made available as an open-source project in 1995 by its creator, [[Yukihiro Matsumoto]] (commonly called ''Matz''), a Japanese computer professional with experience in open-source software and familiarity with a wide variety of programming languages.  Matz has closely managed Ruby releases in the years since it first appeared, and by 2007, Ruby has been ranked tenth in usage among all programming languages.  Furthermore, its use is still growing<ref name="tiobe">
{{cite web|
{{cite web|
url=http://www.tiobe.com/tpci.htm|
url=http://www.tiobe.com/tpci.htm|
Line 9: Line 9:
</ref>.   
</ref>.   


Ruby's place in the U.S. computer industry was boosted by the independent release, in 2004, of [[Ruby on Rails|Rails]], a Ruby-based, open-source [[web application framework]] created by [[David Heinemeier Hansson]], a Danish software engineer working in the United States.  This article is an overview of Ruby's key aspects, independent of Rails, that may contribute to its growing marketplace acceptance, and for which it is sometimes both praised and criticized.
In 2004, Ruby's place in the U.S. computer industry was boosted by the independent release of [[Ruby on Rails|Rails]], a Ruby-based, open-source [[web application framework]] created in the United States by [[David Heinemeier Hansson]], a Danish developer.  This article is an overview of several often-cited Ruby characteristics, independent of Rails, for which the language is sometimes both praised and criticized.


==Ruby Implementations==
==Ruby Implementations==

Revision as of 10:38, 11 October 2007

Main Article
Talk Template:Default button 3
 
Template:Cell style

Ruby is a general-purpose computer programming language made available as an open-source project in 1995 by its creator, Yukihiro Matsumoto (commonly called Matz), a Japanese computer professional with experience in open-source software and familiarity with a wide variety of programming languages. Matz has closely managed Ruby releases in the years since it first appeared, and by 2007, Ruby has been ranked tenth in usage among all programming languages. Furthermore, its use is still growing[1].

In 2004, Ruby's place in the U.S. computer industry was boosted by the independent release of Rails, a Ruby-based, open-source web application framework created in the United States by David Heinemeier Hansson, a Danish developer. This article is an overview of several often-cited Ruby characteristics, independent of Rails, for which the language is sometimes both praised and criticized.

Ruby Implementations

Like many "newer" programming languages (meaning those created or updated since 1990), Ruby is fully object-oriented and requires the installation of a runtime environment, or virtual machine before Ruby programs can be developed or run.

As of October 2007, ever-improving versions of the official open-source Ruby implementation have been released on several different operating systems. These runtimes are interpreted, rather than compiled, and thus Ruby is not yet considered to be a high-performance platform suitable for some heavy-load, enterprise applications. Ruby implementations have also been developed by other groups, including JRuby (an attempt to port Ruby to the Java platform), and Rubinius (an interpreter modeled after self-hosting Smalltalk virtual machines).

As of 2007, no formal written specification has been provided for validating Ruby implementations. So although Ruby can potentially can be used to create platform-independent programs, Ruby is not currently guaranteed to be identical across platforms, and newer versions are not always upwardly compatible with older versions. Furthermore, a burgeoning number of books, articles and other documentation are not always in complete agreement about the syntax, semantics, and conventions of the language. There is widespread agreement that Ruby would benefit for having a formal specification to help unite the various efforts at improving Ruby.

Things people like about Ruby

Despite performance and cross-version and compatibility concerns, enthusiasts of Ruby wax eloquent in praising the language, including numerous subjective statements such as "it's fun". Something of Ruby's appeal may be seen in the brevity of this Hello World program:

puts "Hello, world"

But simple as it initially may seem, Ruby is described as having hidden depths, largely as a result of its support for a complex and powerful feature called closures. Peter Cooper, author of a 2007 book about Ruby, introduces the language by stating, "Ruby has more in common with more esoteric languages such as Lisp and Smalltalk than with better known languages such as PHP and C++"[2]. Cooper's book, and numerous other sources, claim that several haracteristics of Ruby allow them to develop programs more quickly than with other languages, including:

  1. closures
  2. a relatively permissive syntax, said to be "more like the way people think"
  3. loose typing
  4. good string handling and regular expressions
  5. extensive libraries for networking and web services
  6. powerful support for making calls out to the native operating system if needful

References

  1. "TIOBE Programming Community Index". TIOBE Software (2007). Retrieved on 2007-10-10.
  2. "Beginning Ruby: From Novice to Professional". Apress paperback book, Introduction p. xxix (2007). Retrieved on 2007-10-10.