Computer Science Canada

May I suggest "D" from digitalmars

Author:  btiffin [ Wed Jan 30, 2008 11:53 am ]
Post subject:  May I suggest "D" from digitalmars

Hi,

An alternative to C/C++ is now D. D the language is in active development and release 2.0 is in beta test.

The primary designer, Walter Bright is very active in the D forums and the community, while perhaps a little more harsh than here at compsci.ca, is quite helpful.

D could well be (but no guarantees) the up and comer that displaces C/C++ as the general programming language of choice. Then again, it probably won't ... Walter is not making enough mistakes. Smile

One of the main advantages of D over C/C++ is the compiler's built in garbage collection. This removes the malloc/free code path correctness and heap corruption problems faced by most C coders. You can still manage your own memory, but you don't HAVE to.

Plus it has some very nice features for supporting professional level programming practices. Documentation can be built right into the source code of a program, Unit testing in source is well supported as well as "contract" programming with pre and post conditions that can be part of any programmer defined function.

D can be found at http://www.digitalmars.com/d/

Perhaps you will be the new employee that influences an entire corporate empire in the choice of development language. Smile

D is my new favourite for Programming in the Small (PitS), Programming in the Many (PitM) and Programming in the Large (PitL). It is a great environment for rapid development of personal projects (PitS) and the compiler has professional grade tools that assist with large team efforts (PitM) and on large scale projects (PitL). It's not as mature as C/C++ but it's quickly building a user and source code base.

Cheers,
Brian Tiffin
Oh and I better mention REBOL, I live for coding in REBOL, everyone should know REBOL.

Author:  Mackie [ Wed Jan 30, 2008 12:18 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

You sure have a thing for unconventional languages don't you? Razz Anyway, D looks alright.

Author:  btiffin [ Wed Jan 30, 2008 12:33 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

Yep, I do like the unconventional; makes for more well rounded problem solving regardless of the target language in use.

Good programmers know of C, Java, Ruby et al.
Great programmers know of John von Neuman, Ralph Griswold, John McCarthy, John Backus, Niklaus Wirth, Bertrand Meyer, Larry Wall, Guido van Rossum, Chuck Moore, Carl Sassenrath, Donald Knuth, James Gosling, Walter Bright, ... et al.

Oh ... and Really Great programmers are Canadian. Smile

Cheers,
Brian Tiffin

Author:  syntax_error [ Wed Jan 30, 2008 1:51 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

btiffin wrote:
One of the main advantages of D over C/C++ is the compiler's built in garbage collection. This removes the malloc/free code path correctness and heap corruption problems faced by most C coders. You can still manage your own memory, but you don't HAVE to.


since im not that well informed of how a language works with the computer type thing this may sound stupid anyhoo :

what i wanted to say was that in the above statement isn't it the same as in java which has a auto garbage collector ??

if so then whats the big difference and if not ... Embarassed

Author:  PaulButler [ Wed Jan 30, 2008 1:59 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

syntax_error @ Wed Jan 30, 2008 1:51 pm wrote:
btiffin wrote:
One of the main advantages of D over C/C++ is the compiler's built in garbage collection. This removes the malloc/free code path correctness and heap corruption problems faced by most C coders. You can still manage your own memory, but you don't HAVE to.


since im not that well informed of how a language works with the computer type thing this may sound stupid anyhoo :

what i wanted to say was that in the above statement isn't it the same as in java which has a auto garbage collector ??

if so then whats the big difference and if not ... Embarassed


Yes, it's the same idea as what Java has. D also does things that Java doesn't (yet) do, like closures and a few other things inspired by functional programming.

Author:  syntax_error [ Wed Jan 30, 2008 2:07 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

care to explain to me what those
PaulButler wrote:
also does things that Java doesn't (yet) do, like closures and a few other things inspired by functional programming.


extra things are and how they are more helpful?

Author:  btiffin [ Wed Jan 30, 2008 2:37 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

difference from D to Java;

Biggest would probably be that D compiles native. There is no virtual machine.

I would say D and Java compete in similar problem domains, but D (or C or C++) excel at systems level coding compared to Java.

Know Java, (besides, James is Canadian) but D may also be worth knowing. imho, D takes C++ and builds on it while cutting some of the "chaff" (where the definition of chaff varies from coder to coder).

Cheers,
Brian Tiffin

Author:  OneOffDriveByPoster [ Wed Jan 30, 2008 3:09 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

C++0x is coming soon (with garbage collection afaik). I guess I might find out myself, but how "open" is D (with regards to platform support)?

Author:  btiffin [ Wed Jan 30, 2008 3:35 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

I've used D on Vista, Win98 and Debian GNU/Linux 4.0 - can't speak for other platforms but there is a D frontend to GCC.

The license for the digitalmars compiler is somewhat proprietary; the frontend is open source and the source is included, the RTL is open source. The gdc (D using GCC) version is completely open source. You can safely redistribute solutions, but not the digitalmars compiler; but then, IANAL (I am not a lawyer).

Cheers,
Brian Tiffin

Author:  wtd [ Thu Jan 31, 2008 1:15 pm ]
Post subject:  RE:May I suggest "D" from digitalmars

I've previously evangelized D here. However, it is a solution to a problem people are increasingly sidestepping by continuing to use C and then wrapping that C code to be available from Ruby, Python, etc, or by using more expressive languages that compile down to CLR or JVM code.

Author:  Tony [ Thu Jan 31, 2008 1:17 pm ]
Post subject:  RE:May I suggest "D" from digitalmars

does jRuby support inline C?

Author:  btiffin [ Thu Jan 31, 2008 2:33 pm ]
Post subject:  Re: May I suggest "D" from digitalmars

wtd; I'd like to request your permission to repost your sidestepping comment to the REBOL 3 alpha board for Carl's benefit. I think the core design team may find it an interesting point of view.

Cheers,
Brian

Author:  wtd [ Fri Feb 01, 2008 12:44 am ]
Post subject:  RE:May I suggest "D" from digitalmars

Not a problem, assuming you properly credit the comments. Smile

Author:  wtd [ Fri Feb 01, 2008 12:47 am ]
Post subject:  Re: May I suggest "D" from digitalmars

syntax_error @ Thu Jan 31, 2008 3:07 am wrote:
care to explain to me what those
PaulButler wrote:
also does things that Java doesn't (yet) do, like closures and a few other things inspired by functional programming.


extra things are and how they are more helpful?


Closures are immensely useful, but can be difficult to appreciate for those not versed in functional programming to appreciate. They arer also hard to appreciate if one's programming language doesn't have a library that makes good use of them.

Author:  rdrake [ Fri Feb 01, 2008 12:54 am ]
Post subject:  Re: May I suggest "D" from digitalmars

I also rather like lambda expressions, even C# has them now:

code:

var adults = allPeople.FindAll(p => p.Age >= 18);


The above goes through every person and finds the ones who are aged 18 or above, then adds those to a new list called "adults."

The equivalent code in Java would be something like:
Java:

List<Person> adults = new List<Person>();

for (Person p : allPeople) {
    if (p.getAge() >= 18) {
        adults.add(p);
    }
}


But anyways, I'm probably straying far off topic now.

Author:  btiffin [ Fri Feb 01, 2008 12:58 am ]
Post subject:  Re: RE:May I suggest "D" from digitalmars

wtd @ Fri Feb 01, 2008 12:44 am wrote:
Not a problem, assuming you properly credit the comments. Smile


Thank you sir; perhaps your comment will move the load/library feature of R3 up the priority list. It's already in REBOL 2 but it's a commercial feature and somewhat of a pain to interface with (especially callbacks).

Cheers,
Brian

Author:  md [ Fri Feb 01, 2008 1:54 pm ]
Post subject:  RE:May I suggest "D" from digitalmars

Cool as D is, it's really not C++; nor does the thread ask for any help. Moved to GD.

Author:  wtd [ Sat Feb 02, 2008 1:50 am ]
Post subject:  RE:May I suggest "D" from digitalmars

I think I'm gonna move it to General Programming.

Author:  wtd [ Sat Feb 02, 2008 1:52 am ]
Post subject:  RE:May I suggest "D" from digitalmars

Oops... accidentally sent it to Network News. Dan, mind moving it to General Programming? Smile


: