Content deleted Content added
m replaced: it's → its (2) |
Jerryobject (talk | contribs) |
||
Line 80:
Ruby 2.0 was intended to be fully backward compatible with Ruby 1.9.3. As of the official 2.0.0 release on February 24, 2013, there were only five known (minor) incompatibilities.<ref name="2-0-release-incompatibilities"/> Ruby 2.0 added several new features, including:
*
*
*
*
*
Starting with 2.1.0, Ruby's versioning policy changed to be more similar to [[semantic versioning]].<ref name="semantic-versioning"/>
Line 146:
}}
Ruby is [[Object-oriented programming|object-oriented]]: every value is an object, including classes and instances of types that many other languages designate as primitives (such as [[Integer (computer science)|integers]], booleans, and "[[null pointer|null]]"). Variables always hold references to objects. Every [[function (programming)|function]] is a [[
Ruby has been described as a [[multi-paradigm programming language]]: it allows procedural programming (defining functions/variables outside classes makes them part of the root, 'self' Object), with object orientation (everything is an object) or [[functional programming]] (it has [[anonymous function]]s, [[Closure (computer science)|closures]], and [[continuation]]s; statements all have values, and functions return the last evaluation). It has support for [[Introspection (computer science)|introspection]], [[
According to the Ruby FAQ, the syntax is similar to [[Perl]]'s and the semantics are similar to [[Smalltalk|Smalltalk's]], but the design philosophy differs greatly from [[Python (programming language)|Python]]'s.<ref name="faq-comparison" />
Line 158:
* Everything is an [[Expression (programming)|expression]] (even [[Statement (programming)|statements]]) and everything is executed [[Imperative programming|imperatively]] (even [[Declaration (computer science)|declarations]])
* Succinct and flexible syntax<ref name="venners-productivity" /> that minimizes [[syntactic noise]] and serves as a foundation for [[___domain-specific languages]]<ref name="fowler-dsl" />
* Dynamic [[
* [[Closure (computer science)|Lexical closures]], [[iterator]]s and [[Generator (computer science)|generators]], with a [[Ruby syntax#Blocks and iterators|block syntax]]<ref name="venners-closures" />
* Literal notation for [[Dynamic array|arrays]], [[Associative array|hashes]], [[regular expression]]s and [[Symbol (Lisp)|symbols]]
|