Ruby

From WikiMD's Food, Medicine & Wellness Encyclopedia

Ruby is a high-level, interpreted programming language that was designed and developed in the mid-1990s by Yukihiro Matsumoto in Japan. Ruby is dynamically typed and uses garbage collection. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming.

History[edit | edit source]

Ruby was conceived on February 24, 1993. In a 1999 post to the ruby-talk mailing list, Yukihiro Matsumoto describes some of his early ideas about the language: "I was talking with my colleague about the possibility of an object-oriented scripting language. I knew Perl (Perl4, not Perl5), but I didn't like it really, because it had the smell of a toy language (it still has). The object-oriented language seemed very promising. I knew Python then. But I didn't like it, because I didn't think it was a true object-oriented language — OO features appeared to be add-on to the language. As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn't find one. So I decided to make it."

Features[edit | edit source]

Ruby has a number of features that are similar to those of Smalltalk, Perl, and Python. It is fully object-oriented, everything in Ruby is an object, including classes and primitives such as numbers and strings. Ruby supports exception handling, iterators, and closures, which are anonymous functions or blocks of code that can be passed around like objects.

Syntax[edit | edit source]

Ruby's syntax is broadly similar to that of Perl and Python. It has strong support for regular expressions and string manipulation, similar to Perl. Ruby also has a number of built-in functions, including those for string and array manipulation.

Implementations[edit | edit source]

The original and most widely used Ruby interpreter is the Ruby MRI, which is written in C. Other implementations include JRuby, which is Ruby implemented in Java, and Rubinius, which is written in Ruby itself.

Usage[edit | edit source]

Ruby is used in a wide range of fields, but it is particularly popular in web development. Ruby on Rails, a popular web development framework, is written in Ruby.

See also[edit | edit source]

Template:Programming-language-stub

Wiki.png

Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD


Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro) available.
Advertise on WikiMD

WikiMD is not a substitute for professional medical advice. See full disclaimer.

Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Admin, Prab R. Tumpati, MD