Exforsys
+ Reply to Thread
Results 1 to 5 of 5

What's Ruby

This is a discussion on What's Ruby within the Ruby forums, part of the Programming Talk category; Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files ...

  1. #1
    mtajim is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    22

    What's Ruby

    Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, extensible, and portable.

    Oh, I need to mention, it's totally free, which means not only free of charge, but also freedom to use, copy, modify, and distribute it.

    Features of Ruby
    Ruby has simple syntax, partially inspired by Eiffel and Ada.
    Ruby has exception handling features, like Java or Python, to make it easy to handle errors.
    Ruby's operators are syntax sugar for the methods. You can redefine them easily.
    Ruby is a complete, full, pure object oriented language: OOL. This means all data in Ruby is an object, in the sense of Smalltalk: no exceptions. Example: In Ruby, the number 1 is an instance of class Fixnum.
    Ruby's OO is carefully designed to be both complete and open for improvements. Example: Ruby has the ability to add methods to a class, or even to an instance during runtime. So, if needed, an instance of one class *can* behave differently from other instances of the same class.
    Ruby features single inheritance only, *on purpose*. But Ruby knows the concept of modules (called Categories in Objective-C). Modules are collections of methods. Every class can import a module and so gets all its methods for free. Some of us think that this is a much clearer way than multiple inheritance, which is complex, and not used very often compared with single inheritance (don't count C++ here, as it has often no other choice due to strong type checking!).
    Ruby features true closures. Not just unnamed function, but with present variable bindings.
    Ruby features blocks in its syntax (code surrounded by '{' ... '}' or 'do' ... 'end'). These blocks can be passed to methods, or converted into closures.
    Ruby features a true mark-and-sweep garbage collector. It works with all Ruby objects. You don't have to care about maintaining reference counts in extension libraries. This is better for your health. ;-)
    Writing C extensions in Ruby is easier than in Perl or Python, due partly to the garbage collector, and partly to the fine extension API. SWIG interface is also available.
    Integers in Ruby can (and should) be used without counting their internal representation. There *are* small integers (instances of class Fixnum) and large integers (Bignum), but you need not worry over which one is used currently. If a value is small enough, an integer is a Fixnum, otherwise it is a Bignum. Conversion occurs automatically.
    Ruby needs no variable declarations. It uses simple naming conventions to denote the scope of variables. Examples: simple 'var' = local variable, '@var' = instance variable, '$var' = global variable. So it is also not necessary to use a tiresome 'self.' prepended to every instance member.
    Ruby can load extension libraries dynamically if an OS allows.
    Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS! ;-)
    Ruby is highly portable: it is developed mostly on Linux, but works on many types of UNIX, DOS, Windows 95/98/Me/NT/2000/XP, MacOS, BeOS, OS/2, etc.


    Source


  2. #2
    liam_bleu's Avatar
    liam_bleu is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    14
    like.. is ruby the name of the program?

    is there any equivalent to ruby?


  3. #3
    klorpet is offline Member Array
    Join Date
    May 2006
    Answers
    41
    Ruby is the name of the programming language (in this case scripting language), like C++ and Basic are names of other programing languages.

    There's lots and lots of scripting languages out there, each has its own strengths and weaknesses. Two of which were mentioned above by Mtajim (perl and python). Perl is the scripting language I tend to use most simply because I am very familiar with it. They're all pretty easy to learn and everyone has their own preferences/biases. So asking which is best will result in many different answers according to who you talk to and more importantly, what you want to use it for.




  4. #4
    mfsi_sudhansup is offline Junior Member Array
    Join Date
    Oct 2011
    Answers
    27
    Hi All,
    Ruby:
    1> Ruby is both a object oriented as well as a scripting language.
    2> Ruby is a cross platform programming language.
    3> Ruby is a cross platform programming language because if you write Ruby code in one machine you can run it another machine without any change.
    4>Ruby is an open source programming language.
    5> Ruby is user interactive programming language.
    6> Ruby is a platform independent programming language.
    7> It implements MVC model.
    8> It supports agile developement model.
    9> It is a dynamic programming language
    10> It is a reflection programming language because it can observe and modify its own structure.
    11> It is a case sensitive language.


  5. #5
    mfsi_sudhansup is offline Junior Member Array
    Join Date
    Oct 2011
    Answers
    27
    Hi All,
    Ruby was developed on 1995 in japan by Yukihiro Matusmoto.
    Ruby is a object oriented as well as scripted programming language.
    It is a cross platform PL.
    It is a platform oriented PL.
    It is a case sensitive PL.
    It supports model view controller approach.
    It is a user friendly PL.
    It is both dynamic as well as reflection programming language.
    If you develop a ruby language in one platform you can able to run in any platform without any change.
    It is an open source PL.
    Thanks
    Sudhansu


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...