LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-03-2008, 07:57 PM   #1
Flesym
Member
 
Registered: Aug 2005
Location: Germany
Distribution: Ubuntu, Debian
Posts: 189

Rep: Reputation: 31
D (Language)- An undeserved shadowy existence...


Hi there,

I have no question or problem...., well, at least no one I want to discuss here... at the moment Instead I would like to promote the quite young language named D a little bit and want you to tell my story with this wonderful piece of Grammar.

I wrote my first programs almost 20 years ago and therefore came across dozens of languages I had (or wanted ) to learn. Under these my prime languages are C, C++, Java C# and Prolog. But my all time favorite was always C++! However this king seems to be almost dethroned. The reason is a guy named Walter Bright who developed this new language that he called D.

I watched this project the past two years and after release 1.0 (early 2007) I gave it a first short try and was very (very) disappointed. -Not about the language itself, but of the support, community, documentation and development tools: No one answered my questions, the rare docs are not even worth a laugher and the development tools were utterly not existent (beside some syntax highlighting). So this shot lasted only two days or so.

I never touched this language again for over a year! But I also never lost sight of it and followed its development... at least from time to time. And it is really a pity that (after a year of 1.0 and heavy development on 2.0) there seems to be no promotion concept at all, no official supported development tools (beside the compiler and a win32 debugger) and apparently no interest to let the world know, that there is a new alternative to the big languages. Sun showed with Java how this is done the right way.

Nevertheless time went by and two weeks ago I decided to give it another shot and --what was this???-- the installation went flawless in five minutes; even with the alternative (and imho much better) standard library Tango. I remember that the last time I had to take a shower after 12 hours of trail and error. Furthermore I found plenty of information, tutorials, examples and even a book to help me on my first steps. But the most important thing for me is in no doubt a working IDE with code-completion, compiler and debugger control as well as symbol browsing, managed project handling and refactorings. During my first shot (last year) I tried several applications but failed ruefully by trying to find an IDE for D to handle these tasks even at it primitives forms.

But now an Eclipse plugin named Descent (last year not very much more than an idea) is quite usable and together with DSSS (a tool to configure and build D projects) as an external tool it fulfills at least my rudimentary needs: Code-completion (works really good!), project management, symbol browsing, compiling and debugging (with gdb integration).

So why do I write all this? Well, as I mentioned earlier, there seems to be no efforts by the developers themselves to tell the world about D. Even most of my colleagues (all of them are longtime computer scientists and software developers) never heard of it -- this is a true shame! D is a wonderful language and is really grown-up during the last year..., but no one knows.... Everyone who is familiar with C++/C# or Java will be familiar with D in no time and will get the advantages of these languages without their drawbacks.

So my petition is: Just give it a try and if you like it then tell your friends about it! And if you switch do D or not: Keep having fun with coding!

-flesym


Here are some links related to D:
(Main site)
http://www.digitalmars.com/d/

(Working installation scripts and -instructions)
http://www.dsource.org/projects/tang...icInstallTango

(Tango - Well documented alternative/replacement to the standard library "Phobos")
http://www.dsource.org/projects/tango

(Descent - IDE for D as a Eclipse plugin)
http://www.dsource.org/projects/descent

(DSS - the build tool)
http://www.dsource.org/projects/dsss

(Great Book about D and Tango)
http://www.amazon.com/Learn-Tango-D-.../dp/1590599608

(Several examples to help you get started)
http://www.dsource.org/projects/tutorials/wiki/

Last edited by Flesym; 06-03-2008 at 08:00 PM.
 
Old 06-04-2008, 01:05 AM   #2
flourish
LQ Newbie
 
Registered: Oct 2006
Location: Germany
Distribution: Ubuntu (dapper)
Posts: 7

Rep: Reputation: 0
Hello Flesym,

well, honestly I was not really interested in your life story ;-) but thank you for pointing me to D, which sounds promising indeed and which I also never heard of before. Since I am a brand new teacher (just passed my last exam ) I am looking for a good language for my students. At the moment my hottest candidates are C++ and Java; Actually I never liked Java because of its "simplicity concept" (no operator overloading, no function pointers....), but I thought this would be the best alternative to C++, which is also my personal favorite, but maybe a little bit too unhandsome and dowdy in modern times and for newcomers in programming.

Would D be another alternative?
 
Old 06-04-2008, 01:26 AM   #3
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
"I am looking for a good language for my students."

Teach them the fundamental concepts. Try Don Knuth's books - so little has changed in over 40 years. So they learn concepts, then learn to program an imaginary machine using an imaginary assembly language - except that this imaginary machine and assembler is actually implemented in software so your students can actually do programming.

After that, perhaps the most widely used languages are C and FORTRAN, C++, Java. Maybe 'Visual Basic'. Any language is easy to understand if you know the fundamentals; otherwise it's just memorizing things and poking around in a somewhat uninformed way. At various times I'd had to learn numerous languages (and can barely remember how to program in most of them now) - Pascal, various incarnations of Basic, numerous assemblers, C, Fortran, Common Lisp, C++, Java. A competent programmer just has to adjust to the task given, so the most important thing is to learn how to program, not to learn a programming language.
 
Old 06-04-2008, 02:25 AM   #4
flourish
LQ Newbie
 
Registered: Oct 2006
Location: Germany
Distribution: Ubuntu (dapper)
Posts: 7

Rep: Reputation: 0
Thank you pinniped for your input,

but right now I'm planning a three-semester course of which in the first (or eventually first and a half) semester(s) I want to teach a language and maybe some fundamentals of a gui library (at the moment I think, this will be wxWidgets) and the rest of the course I will let my students develop a middle sized application in competitive teams and based on what they have learned.

So starting with assembly or even Knuth is no choice and not mine to teach; especially because I presume a basic understanding of general concepts as well as knowledge of common data structures and algorithms learned in a present theoretical course.

I need an easy to learn yet powerful object orientated language (they will learn UML in parallel), ideally with some interesting facets to challenge the more advanced student during the (boring) beginning.

Thanks.
 
Old 06-04-2008, 03:08 AM   #5
Flesym
Member
 
Registered: Aug 2005
Location: Germany
Distribution: Ubuntu, Debian
Posts: 189

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by flourish View Post
Thank you pinniped for your input,

but right now I'm planning a three-semester course of which in the first (or eventually first and a half) semester(s) I want to teach a language and maybe some fundamentals of a gui library (at the moment I think, this will be wxWidgets) and the rest of the course I will let my students develop a middle sized application in competitive teams and based on what they have learned.

So starting with assembly or even Knuth is no choice and not mine to teach; especially because I presume a basic understanding of general concepts as well as knowledge of common data structures and algorithms learned in a present theoretical course.

I need an easy to learn yet powerful object orientated language (they will learn UML in parallel), ideally with some interesting facets to challenge the more advanced student during the (boring) beginning.

Thanks.
Hello flourish,

at first I have to say, that I totally agree with pinniped that it is the better way to learn software development from basic to advanced and not the other way round. On the other hand the world is not black and white and I'm sure that many learning-concepts may form a good developer. I'm not a pedagogue and therefore don't know which way a student (in general) learns best, but it sounds, flourish, that in your institute you know what you are doing.

So D as a first language? -Why not?! I always hated statements like C/C++ is to complex, the learning curve is too steep, better go with Java or Python and bla bla bla. Such statements are often made by people who started with C/C++ themselves and think that this was so difficult that no one else is able to do it the same way.

I think this is nonsense! To learn the (or better "one") language is the most easiest part on the way to a developer. Thus the choosing of the first language is a very simple task (imho): Look at your general conditions (ie. OS compatibility, licenses and required language paradigms such as object oriented, generic, procedural or what ever) and simply choose one of the languages that fulfills these needs..., which one doesn't matter at all! If you master one language you are able to master all of them (with the same paradigms) in just a few weeks. So if you are unsure if C++, C#, Java, Python (have you considered this beautiful language?) or even D, then flip a coin! -They all do their jobs pretty well.

But of course I would choose my new love D, because you have a garbage collector but don't have to use it, you have pointers but don't have to use them, you have all kinds of wonderful features and are often very free to use them or not. Have look here:
http://www.digitalmars.com/d/1.0/comparison.html
Furthermore there also bindings to some gui libs like gtk (GtkD) and wxWidgets (wxD). As I said in my first post: Try it and choose by yourself, it's free

-flesym

Last edited by Flesym; 06-04-2008 at 03:14 AM.
 
Old 06-05-2008, 10:37 AM   #6
flourish
LQ Newbie
 
Registered: Oct 2006
Location: Germany
Distribution: Ubuntu (dapper)
Posts: 7

Rep: Reputation: 0
Flesym,

today I wanted to take a closer look at D, but sorry, to get all this running seems a bit trickier than I thought (and you said). Maybe I'm a bit confused by all this "tango-phobos-gdc-dmd-dsss-bud-rebuild" stuff but I can't get anything compiled and am not even sure if I installed everything I need correctly. Is there any shortcut I missed!
 
Old 06-05-2008, 11:08 AM   #7
Flesym
Member
 
Registered: Aug 2005
Location: Germany
Distribution: Ubuntu, Debian
Posts: 189

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by flourish View Post
Flesym,

today I wanted to take a closer look at D, but sorry, to get all this running seems a bit trickier than I thought (and you said). Maybe I'm a bit confused by all this "tango-phobos-gdc-dmd-dsss-bud-rebuild" stuff but I can't get anything compiled and am not even sure if I installed everything I need correctly. Is there any shortcut I missed!
Yes, maybe the worlD seems a little bit confusing at first, but it's really not that hard. I'm sure you already read at least some of the docs on the sites I posted earlier, so I will explain the basics in my words:

-DMD: original D compiler from Digital Mars
-GDC: D Front End for GCC
-Phobos: original standard library
-Tango: aternative standard library (I recommend using this one instead of phobos!)
-rebuild: rebuild of bud
-bud: configuring and build tool
-dsss: builds upon rebuild (easier and more elegant than using rebuild directly)

The shortcut:
download and install this sript. It is a bundle of gdc, tango and dsss.

Your first program:

File: hello.d
Code:
import  tango.io.Console;

void main()
{
   Cout("Hello World").newline;
}
Now create a file named dsss.conf in the same folder as hello.d and put this into it:
File dsss.conf:
Code:
name = hello
[hello.d]
target = ./hello
You won't have to change this file very often; even if new sources are added to your application, dsss will find them through the imports.


Now you only have to run (in that directory)
Code:
dsss build
Hope that helps!

Have fun,
-flesym

Last edited by Flesym; 06-05-2008 at 11:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] Check File existence hbinded Programming 3 12-19-2006 05:15 PM
how does grub knows about existence of other OS? mohit_garg Linux - Newbie 29 07-13-2005 07:24 PM
Device existence problem..... roshu Mandriva 2 02-07-2005 06:01 AM
Scanner's temporal existence phantompgr Fedora 0 10-14-2004 06:51 PM
check for existence of file j-me Linux - Newbie 5 07-29-2003 07:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration