www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Learning D

reply Clessy <Clessy_member pathlink.com> writes:
Is there any genertic guide on actually learning D if you dont know any other
programing language. Like D for dummies or something? It sounds like its a
easier choice than C++ and it also seems like it would have much more portable
libaries than C++ and its Windows based compilers.
Sep 01 2004
next sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Clessy wrote:

 Is there any genertic guide on actually learning D if you dont know any other
 programing language. Like D for dummies or something? It sounds like its a
 easier choice than C++ and it also seems like it would have much more portable
 libaries than C++ and its Windows based compilers.
http://www.digitalmars.com/d/overview.html Who D is Not For * As a first programming language - Basic or Java is more suitable for beginners. D makes an excellent second language for intermediate to advanced programmers. Well, D hadn't been invented when I started doing BASIC on the good old ZX Spectrum, so I'm not sure if I'd agree or disagree.... Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 01 2004
next sibling parent Sean Kelly <sean f4.ca> writes:
In article <ch4hma$287j$1 digitaldaemon.com>, Stewart Gordon says...
Clessy wrote:

 Is there any genertic guide on actually learning D if you dont know any other
 programing language. Like D for dummies or something? It sounds like its a
 easier choice than C++ and it also seems like it would have much more portable
 libaries than C++ and its Windows based compilers.
http://www.digitalmars.com/d/overview.html Who D is Not For * As a first programming language - Basic or Java is more suitable for beginners. D makes an excellent second language for intermediate to advanced programmers. Well, D hadn't been invented when I started doing BASIC on the good old ZX Spectrum, so I'm not sure if I'd agree or disagree....
Pascal is a good first language for procedural programming (it was created as a teaching language, after all). Java is okay, though I think it depends on the person. Also, I worry that learning a garbage-collected language first might make picking up C/C++ later more difficult (which may suggest D shouldn't be learned first either). I think C++ is probably the most complicated language I've encountered, which may or may not make it a good first choice. But I can think of a good intro book for C++: "Accelerated C++" by Andrew Koenig and Barbara Moo. Between that and the comp.lang.c++ usenet group you would probably do pretty well. Sean
Sep 01 2004
prev sibling parent reply Lynn A <Lynn_member pathlink.com> writes:
From The WB:
http://www.digitalmars.com/d/overview.html

Who D is Not For

     * As a first programming language - Basic or Java is more suitable 
for beginners. D makes an excellent second language for intermediate to 
advanced programmers.
<alert comment="D newbie who is NOT advocating Javascript and is VERY IMPRESSED with D> The last several times I've been asked about "What is a decent very first programming language?", I've found myself recommending Javascript. IMHO, it has these advantages: * less to learn to get "Hello, World" to show up * fewer tools to learn and setup * often immediately useful for work or school * often advantageous for career advancement * syntactically/semantically somewhat like C and D * reasonably well designed * somewhat "object based" * vast resources, especially sample code and co-workers * FUN! It's cool with immediate feedback to see a webpage "come to life" in a browser window as you made changes. BTW, this thread has the potential for straying from something that is helpful to the original poster. Should this sub-thread be renamed to something like: "Preferred 1st language to facilite learning D" </alert>
Sep 01 2004
next sibling parent Sean Kelly <sean f4.ca> writes:
In article <ch4osa$2b7u$1 digitaldaemon.com>, Lynn A says...
The last several times I've been asked about "What is a decent very first
programming language?", I've found myself recommending Javascript. IMHO, it has
these advantages:

* less to learn to get "Hello, World" to show up
* fewer tools to learn and setup
* often immediately useful for work or school
* often advantageous for career advancement
* syntactically/semantically somewhat like C and D
* reasonably well designed 
* somewhat "object based"
* vast resources, especially sample code and co-workers
* FUN! It's cool with immediate feedback to see a webpage "come to life" in a
browser window as you made changes.
To be perfectly honest, I think the ideal first language depends on the student. My wife learns from the bottom up and was incredibly frustrated at having details left out of a C++ course she took recently. She was so focused on the need to know *how* things were being done that she had a very hard time with even simple programming assignments. And to make matters worse, the teacher was so devoted to his specific learning process that my wife was afraid to do any outside work to learn the material in a way that made sense to her. I suggested she start over with a course on computer architecture and assembler and she's loving it, and I expect that she'll excel at the next programming couse she takes. By the same token, some people learn better from the top down, and Javascript is a good language for this--it's very forgiving and allows the student to focus on program flow and boolean logic without sweating the other issues. It's also important to note that Javascript applications can be run from the command-line in Windows, so its use is not strictly limited to web page design (and I think it would probably be better to leave the webserver layer out of a Programming 101 type course as it's just extra baggage that might confuse people). Sean
Sep 01 2004
prev sibling next sibling parent reply Id <Id_member pathlink.com> writes:
The last several times I've been asked about "What is a decent very first
programming language?", I've found myself recommending Javascript. IMHO, it has
these advantages:

* less to learn to get "Hello, World" to show up
* fewer tools to learn and setup
* often immediately useful for work or school
* often advantageous for career advancement
* syntactically/semantically somewhat like C and D
* reasonably well designed 
* somewhat "object based"
* vast resources, especially sample code and co-workers
* FUN! It's cool with immediate feedback to see a webpage "come to life" in a
browser window as you made changes.

BTW, this thread has the potential for straying from something that is helpful
to the original poster. Should this sub-thread be renamed to something like:
"Preferred 1st language to facilite learning D"

</alert>
I'd rather recommend Java than Javascript, as it introduces you to types and object oriented programming in a way it's easy to learn, with just requiring will to learn, as there are no stupid complications and the language will warn you when something fishy, like a uninitialized variable, is found. However, IMHO Java is excessively restrictive...I find lacking it of unsigned operands, assembler launching and the infamous yet useful goto. Damnit, its 'evilness' is overrated. That funny unconditional jump could reduce a few lines of code without affecting readability. In the right hands it's good to have.
Sep 01 2004
parent Joey Peters <Joey_member pathlink.com> writes:
In article <ch58qp$2ieg$1 digitaldaemon.com>, Id says...
The last several times I've been asked about "What is a decent very first
programming language?", I've found myself recommending Javascript. IMHO, it has
these advantages:

* less to learn to get "Hello, World" to show up
* fewer tools to learn and setup
* often immediately useful for work or school
* often advantageous for career advancement
* syntactically/semantically somewhat like C and D
* reasonably well designed 
* somewhat "object based"
* vast resources, especially sample code and co-workers
* FUN! It's cool with immediate feedback to see a webpage "come to life" in a
browser window as you made changes.

BTW, this thread has the potential for straying from something that is helpful
to the original poster. Should this sub-thread be renamed to something like:
"Preferred 1st language to facilite learning D"

</alert>
I'd rather recommend Java than Javascript, as it introduces you to types and object oriented programming in a way it's easy to learn, with just requiring will to learn, as there are no stupid complications and the language will warn you when something fishy, like a uninitialized variable, is found. However, IMHO Java is excessively restrictive...I find lacking it of unsigned operands, assembler launching and the infamous yet useful goto. Damnit, its 'evilness' is overrated. That funny unconditional jump could reduce a few lines of code without affecting readability. In the right hands it's good to have.
Actually I think JavaScript wouldn't be that much of a good idea, it is better than most languages though. It allows 'a lot' of magic, it makes it easy to some point, but the fact you can do something 'hackish' and verbose so easily also makes the learning curve stop at a point where it shouldn't. JavaScript does show a nice light form of object orientation though (without the inheritances). I don't really like Java, though it shows what programmers should worry about instead of what they shouldn't worry about the first few classes they take (memory managment, etc). Personally, I think Python and Pascal are good candidates, first Python to show 'how' to put an abstract problem/algorithm down in concrete text (and teach object orientation, without bothering about types and memory), and second Pascal to show how things really work on an imperative 'real' computer scale.
Sep 01 2004
prev sibling parent Dave <Dave_member pathlink.com> writes:
In article <ch4osa$2b7u$1 digitaldaemon.com>, Lynn A says...
From The WB:
http://www.digitalmars.com/d/overview.html

Who D is Not For

     * As a first programming language - Basic or Java is more suitable 
for beginners. D makes an excellent second language for intermediate to 
advanced programmers.
<alert comment="D newbie who is NOT advocating Javascript and is VERY IMPRESSED with D> The last several times I've been asked about "What is a decent very first programming language?", I've found myself recommending Javascript. IMHO, it has these advantages: * less to learn to get "Hello, World" to show up * fewer tools to learn and setup * often immediately useful for work or school * often advantageous for career advancement * syntactically/semantically somewhat like C and D * reasonably well designed * somewhat "object based" * vast resources, especially sample code and co-workers * FUN! It's cool with immediate feedback to see a webpage "come to life" in a browser window as you made changes. BTW, this thread has the potential for straying from something that is helpful to the original poster. Should this sub-thread be renamed to something like: "Preferred 1st language to facilite learning D" </alert>
(This is assuming you are talking about people who want to make a professional future out of programming). Current (and I stress current) popularity aside, I think D would be a great first language because you can start out with procedural programming for simple string and mathematical operations and move up from there. Unlike C but like Java, JavaScript and the rest you can do string manip. w/o having to use things like malloc(), strcat(), etc. Plus you can then move on to 'more complicated' things with the same basic syntax and tools. The overview web page I think was written that way because D is intended for more complicated, high-performance programming tasks which are not for beginners in any case. But, really, I think alot of things can be done as simply in D as in BASIC. Java kinda 'forces' you into OOP so that may make the learning curve higher to start with. I think for most beginners, programming is intimidating enough w/o having to also remember some OOP rules/syntax just to write programs like "hello world". Plus there is a little more to remember and learn right away in order to actually build and run your code. JavaScript is indeed very attractive because people can write things that execute in browsers and it is forgiving. But it can also often require two sets of syntax to do the same things from the command line (for example, with WSH) as well. D's tools are also relatively easy to install and use - at least the DM versions are. D offers a really well-rounded first language from both a learning curve and a comp. sci. POV, I think, if someone plans on working in this field. It's easy for people who are accustomed to C/++ to see the similarities in D and therefore dismiss it as a first language. But the thing about D is that beginning concepts (strings, math, simple I/O) can be taught w/o explicit knowledge of things like pointers and memory management, just like Java and BASIC. I can't think of another language with as smooth (or as broad) of a learning curve, come to think of it. - Dave
Sep 02 2004
prev sibling next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Clessy wrote:
 Is there any genertic guide on actually learning D if you dont know any other
 programing language. Like D for dummies or something? It sounds like its a
 easier choice than C++ and it also seems like it would have much more portable
 libaries than C++ and its Windows based compilers.
 
my advice to you is first learn C, and then learn D. D is like C except a step upwards, more so than c++ is. After you know C, you can goto www.dsource.org tutorials and ditigalmars.com/d to learn D.
Sep 01 2004
parent Berin Loritsch <bloritsch d-haven.org> writes:
clayasaurus wrote:

 Clessy wrote:
 
 Is there any genertic guide on actually learning D if you dont know 
 any other
 programing language. Like D for dummies or something? It sounds like 
 its a
 easier choice than C++ and it also seems like it would have much more 
 portable
 libaries than C++ and its Windows based compilers.
my advice to you is first learn C, and then learn D. D is like C except a step upwards, more so than c++ is. After you know C, you can goto www.dsource.org tutorials and ditigalmars.com/d to learn D.
I would advise learning another object oriented language. Having maintained code that was developed by someone who knew C, but tried to throw some "objects" in there--you can cause more work for yourself than necessary. Learning the value of good object orientation will help create more maintainable and modular code. It's not impossible to do with C, but its a lot harder to do it right with C. Heck, I routinely have to work with atrocities written in Java because the original author didn't know enough about good object oriented design. Once you get the basics down, the most difficult being the mindset, you can judge whether a simple C style function or a class makes more sense.
Sep 01 2004
prev sibling next sibling parent J C Calvarese <jcc7 cox.net> writes:
In article <ch4gi7$27lb$1 digitaldaemon.com>, Clessy says...
Is there any genertic guide on actually learning D if you dont know any other
programing language. Like D for dummies or something? It sounds like its a
easier choice than C++ and it also seems like it would have much more portable
libaries than C++ and its Windows based compilers.
Here's an overview of the tutorial-type resources that I know of: http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial You might try starting here: http://www.dsource.org/tutorials/index.php?show_topic=Fundamentals None of the tutorials are what I'd call "complete", but they might be enough to get started. You can request more examples, but it might be more effective to learn some C and then try learning D again. Personally, I have limited C experience, but I've programmed some in BASIC, Pascal, FORTRAN, Java, and PHP. If you want to learn D, C is probably the best language to get you prepared. jcc7
Sep 01 2004
prev sibling next sibling parent reply Deja Augustine <deja scratch-ware.net> writes:
Clessy wrote:
 Is there any genertic guide on actually learning D if you dont know any other
 programing language. Like D for dummies or something? It sounds like its a
 easier choice than C++ and it also seems like it would have much more portable
 libaries than C++ and its Windows based compilers.
 
 
I would strongly recommend going through some C tutorials (avoid C++ at this point) until you feel comfortable with the basics such as working with functions, the compile/link build system, using the standard C library, etc. Once you're able to write small apps in C without having to constantly reference a tutorial, then you would probably have enough of a grasp of programming in general to take a look at D. However, it's important to heed what other people mentioned and spend some time learning good Object-Oriented Programing techniques as knowing the language and knowing how to use it well are two very different things. Something that might help would be to learn C and then learn D. While you're learning D, don't even bother with objects, just stick to C-style programming as you learn the language. While you're doing that, however, do a google search for a few articles on object-oriented programming and really try to understand how it works and when and why you'd use it. Good luck, -Deja
Sep 01 2004
parent reply John Reimer <brk_6502 NOSP_AM.yahoo.com> writes:
 
 I would strongly recommend going through some C tutorials (avoid C++ at 
 this point) until you feel comfortable with the basics such as working 
 with functions, the compile/link build system, using the standard C 
 library, etc.
 
 Once you're able to write small apps in C without having to constantly 
 reference a tutorial, then you would probably have enough of a grasp of 
 programming in general to take a look at D.
 
 However, it's important to heed what other people mentioned and spend 
 some time learning good Object-Oriented Programing techniques as knowing 
 the language and knowing how to use it well are two very different 
 things.  Something that might help would be to learn C and then learn D. 
  While you're learning D, don't even bother with objects, just stick to 
 C-style programming as you learn the language.  While you're doing that, 
 however, do a google search for a few articles on object-oriented 
 programming and really try to understand how it works and when and why 
 you'd use it.
 
 Good luck,
 
 -Deja
This is very good advice, I think. D is not merely an OOP language; it's features are quite useful without even taking its OOP set into consideration. In fact, as far as procedural programming goes, D is a wonderfully fun language to learn. I would have even preferred learning it before learned C. But the process of learning C gives one more of an opportunity to understand basic low-level computer function. Still, I would like to mention that those coming from object oriented C++ and Java backgrounds may find D OOP a little confusing. D tries to imitate C++ type inheritance characteristics despite it's adoption of decidely Java-like features (interfaces, single inheritance). The mix of ideologies can sometimes lead a new programmer to making some confusing and incorrect assumptions. Heck, it might be best to just learn D without any prior background afterall. All D needs then, is a proper language tutorial.
Sep 01 2004
parent Ant <Ant_member pathlink.com> writes:
In article <ch4u27$2dar$1 digitaldaemon.com>, John Reimer says...
 I would have even preferred learning it [D] before learned C.
 But the process of learning C gives one more of an 
opportunity to understand basic low-level computer function.
I think the only reason not to start with D is the lack of absolute beginer tutorials. (the web page should be changed.) Ant
Sep 01 2004
prev sibling next sibling parent "Lynn Allan" <l_d_allan adelphia.net> writes:
See the following for tutorials:

http://www.dprogramming.com/tutorial.php
by Vathix xx kernel.net

http://www.dsource.org/tutorials/
by Justin Calvarese (jcc7)

"Clessy" <Clessy_member pathlink.com> wrote in message 
news:ch4gi7$27lb$1 digitaldaemon.com...
 Is there any genertic guide on actually learning D if you dont know any 
 other
 programing language. Like D for dummies or something? It sounds like its a
 easier choice than C++ and it also seems like it would have much more 
 portable
 libaries than C++ and its Windows based compilers.

 
Sep 01 2004
prev sibling parent Mr.Novice back ! <Mr.Novice_member pathlink.com> writes:
Goodday fellows!
Mr.Deja's Advice seems to be the best one so far.It seems that comprehensive D
tutorials (preferrably on Digitalmars) will appear in 2006 or later.
Most Novice Programmer of the D forum. 
Sep 01 2004