digitalmars.D - Another Front - D Vs Ruby and Python
- the Novice Adventurer (7/7) Jul 24 2004 Goodday again!
- Deja Augustine (8/17) Jul 24 2004 http://www.scratch-ware.net/D/
- Mike Parker (6/15) Jul 24 2004 I'm also working on Python bindings as part of the Derelict project at
- Andy Friesen (9/16) Jul 24 2004 It's pretty much the same as the differences between C++ and
- J C Calvarese (22/29) Jul 24 2004 Is 4 good enough?
- Charles Hixson (13/18) Jul 25 2004 I believe that RedHat's anaconda hardware detection is written in
- Robert Jones (15/24) Jul 25 2004 Here is my view of Ruby vs D
- Robert Jones (3/36) Jul 25 2004 Forgot: 6. Ruby is dynamicly typed, D is staticly typed.
- Sam McCall (16/30) Jul 27 2004 I'm not sure if one could call ruby's interpreter "fast", it depends
- Novice One (8/38) Jul 29 2004 Goodday Sir!
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
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
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
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
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
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.)...4) Can you use Python for systems programming? I don't think so. ...
Jul 25 2004
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.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++. 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
Robert Jones wrote:the Novice Adventurer wrote:Forgot: 6. Ruby is dynamicly typed, D is staticly typed. 7. Ruby is also great for small scripts, D isn't.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.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++.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
Robert Jones wrote:the Novice Adventurer wrote: 1. Ruby has a fast interpreter while D has a fast compiler.I'm not sure if one could call ruby's interpreter "fast", it depends 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.Although you can use ruby in a procedural way. Ruby's support for 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.I'd generally agree (as long as by application you mean anything not 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.Definitely.Ruby can interface with C so interfacing with D shouldn't be a problem, but I could be wrong.It shouldn't, but someone needs to port the header file (it's macro-heavy). Has anyone done this already? I'll see what I can come up with. Sam
Jul 27 2004
In article <ce52b8$1vkk$1 digitaldaemon.com>, Sam McCall says...Robert Jones wrote: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.the Novice Adventurer wrote: 1. Ruby has a fast interpreter while D has a fast compiler.I'm not sure if one could call ruby's interpreter "fast", it depends 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.Although you can use ruby in a procedural way. Ruby's support for 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.I'd generally agree (as long as by application you mean anything not 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.Definitely.Ruby can interface with C so interfacing with D shouldn't be a problem, but I could be wrong.It shouldn't, but someone needs to port the header file (it's macro-heavy). Has anyone done this already? I'll see what I can come up with. Sam
Jul 29 2004