2 Replies - 1819 Views - Last Post: 28 July 2009 - 07:11 AM Rate Topic: -----

#1 athenadiosa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-July 09

ruby programming

Post icon  Posted 25 July 2009 - 02:53 AM

[cod :) :blink: :blink: :)

can you tell me the differences of the ruby programming from the java and python programming language

Is This A Good Question/Topic? 0
  • +

Replies To: ruby programming

#2 upland  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 28-July 09

Re: ruby programming

Posted 28 July 2009 - 07:05 AM

View Postathenadiosa, on 25 Jul, 2009 - 01:53 AM, said:

[cod :) :blink: :blink: :)

can you tell me the differences of the ruby programming from the java and python programming language


This would be a very long answer - but you could try googling it ... for example:

http://www.dmh2000.com/cjpr/
Was This Post Helpful? 0
  • +
  • -

#3 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 902
  • View blog
  • Posts: 3,163
  • Joined: 12-May 09

Re: ruby programming

Posted 28 July 2009 - 07:11 AM

I learned Ruby after using Java for years. A lot of concepts are similar, except that Ruby takes OO very literally. You can call a method on anything - string literals, integers, etc. Everything is an object.
Overloading methods in Ruby isn't supported.
Ruby has modules/mixins, which are somewhat analogous to Java's interfaces and static classes.
Java is compiled to bytecode, which is then run on a virtual machine. This makes Java faster than Ruby (and Python) in general.
Filehandling, server communication (in fact, pretty much any IO) is much simpler in Ruby than Java. You can edit a class during runtime in Ruby.

Ruby and Python have a lot in common in that they are both high level scripting languages. Python uses white space to indicate blocks, Ruby has the keywords do/end along with braces. Ruby does objects better than Python (self comes to mind here). Being heavily influenced by Perl, Ruby follows the philosophy that problems can be solved in many different ways, while Python follows the philosophy that there is One Obvious Way to solve a problem. Both have several graphics toolkits. Ruby also follows a Principle of Least Surprise, in that Ruby actions should not be surprising or have "gotchas" but should work as you expect them to.

This post has been edited by xclite: 28 July 2009 - 07:13 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1