www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Another Front - D Vs Ruby and Python

reply the Novice Adventurer <the_member pathlink.com> writes:
Goodday again!
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.
Jul 24 2004
next sibling parent reply Deja Augustine <deja scratch-ware.net> writes:
the Novice Adventurer wrote:

 Goodday again!
 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.
 
 

http://www.scratch-ware.net/D/ I've ported over the Python/C API to D so you can embed Python into D or extend Python from D. Aside from that, at least on the Python vs. D front, there's not really much else for comparison. They're really two different languages with their own distinct advantages over eachother, depending on what you're trying to do.
Jul 24 2004
parent Mike Parker <aldacron71 yahoo.com> writes:
Deja Augustine wrote:
 http://www.scratch-ware.net/D/
 
 I've ported over the Python/C API to D so you can embed Python into D or 
 extend Python from D.
 
 Aside from that, at least on the Python vs. D front, there's not really 
 much else for comparison.  They're really two different languages with 
 their own distinct advantages over eachother, depending on what you're 
 trying to do.

I'm also working on Python bindings as part of the Derelict project at http://www.dsource.org/. The difference is that, where the above uses implicit linking with the DLL (i.e. you link to a static import lib), my version uses explicit linking (the DLL is loaded manually with a function call).
Jul 24 2004
prev sibling next sibling parent Andy Friesen <andy ikagames.com> writes:
the Novice Adventurer wrote:
 Goodday again!
 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.

It's pretty much the same as the differences between C++ and Ruby/Python, except that D is far easier to write, and has better support for contracts than either. A combination of D and Python could be very productive indeed. You still get the breakneck development speed Python is famous for, but you don't have quite as delecate a balancing act between speed and power, as D isn't all that hard to write either. -- andy
Jul 24 2004
prev sibling next sibling parent reply J C Calvarese <jcc7 cox.net> writes:
the Novice Adventurer wrote:
 Goodday again!
 I would like to know your opinions regarding the prospects of D against the
 modern rising trend-setters like Python and 'the OO' Ruby.

Is this a project for school or something?
 The Top 5 differences/distinctions , please.

Is 4 good enough?
 Any D and Ruby/python interoperation chances/benefits?
 Thanking you,
 Irfan.

Anyways, I know enough about Python to toss out some differences. 1) In D everything is REALLY compiled. I know that you can emulate it in Python by embedding .py into .exe's, but it's not quite the same. 2) Since it's natively compiled I'd bet that D program would typically run faster (and probably use less memory). I'm sure there are exceptions to that, but that should generally be the case. 3) In Python, whitespace (tabs or spaces) is used to denote blocks. I prefer D's use of curly braces {}. 4) Can you use Python for systems programming? I don't think so. It's important to realize that D and Python are good at different things. Python is meant to be a scripting language, and it fills that role nicely. D is meant to be efficient and close to the machine (inline assembly is even available). Also, there are many libraries, wrappers, and interfaces available for Python that do many cool things. D's library support will grow, but I doubt it will catch up to Python anytime soon. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jul 24 2004
parent Charles Hixson <charleshixsn earthlink.net> writes:
J C Calvarese wrote:
 the Novice Adventurer wrote:
 
...

...

I believe that RedHat's anaconda hardware detection is written in Python. I know that many of their utilities are. You can do systems programming, but it's rather more like a super shell than like a C program. And you generally need C routines at the bottom to handle the computationally intensive tasks. In this mesh, D could replace C, but would have a very difficult time replacing Python. D defines the types of things at compile time. One can get around this with lots of indirection and casting...but if you're going to do that, you slow things down so much that you might have well saved your time and coded directly in Python. And Python already has most of the bugs out. (Of that snarl of complexity of indirection.)
Jul 25 2004
prev sibling parent reply Robert Jones <robertjones21 HotPOP.com> writes:
the Novice Adventurer wrote:
 Goodday again!
 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.
 
 

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++. 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 robertjones21 HotPOP.com
Jul 25 2004
next sibling parent Robert Jones <robertjones21 HotPOP.com> writes:
Robert Jones wrote:

 the Novice Adventurer wrote:
 
 Goodday again!
 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.

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++.

Forgot: 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
 robertjones21 HotPOP.com

Jul 25 2004
prev sibling parent reply Sam McCall <tunah tunah.net> writes:
Robert Jones wrote:
 the Novice Adventurer wrote:
 1. Ruby has a fast interpreter while D has a fast compiler.

what you're comparing to. I hear python's is faster, especially with bytecode. But I don't care, if I need the speed I'll use D.
 2. Ruby is a "pure OO" programing language, D is multi-paradigm.

functional programming is likely more powerful (I haven't tried hard to use D this way though).
 3. Ruby is only good for general appilication programming, D does 
 system-level programming as well.

system-level, ruby's great for web stuff etc). Doesn't stop my Operating Systems lecturer using it to teach his course though :-\
 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++.
 
 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.

macro-heavy). Has anyone done this already? I'll see what I can come up with. Sam
Jul 27 2004
parent Novice One <Novice_member pathlink.com> writes:
In article <ce52b8$1vkk$1 digitaldaemon.com>, Sam McCall says...
Robert Jones wrote:
 the Novice Adventurer wrote:
 1. Ruby has a fast interpreter while D has a fast compiler.

what you're comparing to. I hear python's is faster, especially with bytecode. But I don't care, if I need the speed I'll use D.
 2. Ruby is a "pure OO" programing language, D is multi-paradigm.

functional programming is likely more powerful (I haven't tried hard to use D this way though).
 3. Ruby is only good for general appilication programming, D does 
 system-level programming as well.

system-level, ruby's great for web stuff etc). Doesn't stop my Operating Systems lecturer using it to teach his course though :-\
 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++.
 
 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.

macro-heavy). Has anyone done this already? I'll see what I can come up with. Sam

Goodday Sir! Nobody else has done the porting of the header file from Ruby to D or vice versa (I am quite ignorant in this domain :( . So , I guess that you may PLEASE 'look into this matter and come up with something' ! Mr.Deja Augustine has done the same procedure (Porting) for his Python/D API , that may provide you with a helpful reference. Irfan.
Jul 29 2004