Last update July 28, 2009

Coming From /
Ruby



From NG:digitalmars.D/6990:

I would like to know your opinions regarding the prospects of D against the modern rising trend-setters like Python and 'the OO' Ruby.

The Top 5 differences/distinctions, please.

Any D and Ruby/python interoperation chances/benefits?

Thanking you, Irfan.


From NG:digitalmars.D/7129 / NG:digitalmars.D/7130:

Here is my view of Ruby vs D

  1. Ruby has a fast interpreter while D has a fast compiler.
  2. Ruby is a "pure OO" programing language, D is multi-paradigm.
  3. Ruby is only good for general appilication programming, D does system-level programming as well.
  4. Ruby has syntax similar to Eiffel, D is based off of C in that respect.
  5. Ruby is a threat to Perl and Python, D is a threat to C and C++.
  6. Ruby is dynamicly typed, D is staticly typed.
  7. Ruby is also great for small scripts, D isn't.
IMHO they have different targets and aren't in competition with each other. They in fact again IMHO complement each other in some ways.

Ruby can interface with C so interfacing with D shouldn't be a problem, but I could be wrong.

Robert Jones


I am interested in developing this, and in particular the idea of interfacing Ruby to D. I have already worked with both Ruby and D separately interfaced to C and C++ using SWIG (see D with Swig ). I would be interested to see a Ruby column in the table of language comparisons on Languages Versus D but don't feel competent to complete it myself. One of my interests is in the use of operator overloading so that expressions such as

z = x + y

can have their natural meaning for the user. I think that both D and Ruby are good for that.

As a start to this I realised that if I can call a D function from C then I can call the C function from Ruby. That turns out to be not too difficult - see D Called From C and D Called From C: Discussion

JohnFletcher


You are absolutely right - D can be one of best languages to program extensions for Ruby and to split program in two parts - time-critical written in D and using complex algorithms and datastructures written in Ruby

BulatZiganshin


The rubyd project may be helpful for people that want to use D and Ruby together. But I don't really know anything about the project, so I could be wrong. -- JustinCalvarese

Related


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: July 28, 2009 1:29 (diff))