October 17, 2014
On Friday, 17 October 2014 at 05:38:51 UTC, maarten van damme via Digitalmars-d-learn wrote:
> While d can be complex, there's nothing preventing you from starting out
> simple and not using all features at first.
> I don't understand why it's not suitable for a beginner if you use this
> approach...

Anything that keeps you motivated is suitable, but for a beginner the goal should not be to  learn a language, but to learn programming principles and learn how to write clean programs.

Using a more uniform language that is suitable for teaching is better, and provides more educational resources. Where would you go to find examples of clean programming in D/C++?

For the first few weeks getting instant feedback from a REPL is gratifying and being constrained by a functional/recursive paradigm is good. Getting instant visual feedback is motivating and makes it easy to see where you go wrong. Nice for the first steps if you are a visual person.
October 17, 2014
On 17/10/14 03:05, ketmar via Digitalmars-d-learn wrote:
> On Fri, 17 Oct 2014 00:52:14 +0000
> MachineCode via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>
>> I don't understand. If at least it were C but java? why not D
>> itself?
> C is *awful* as "beginner's language". never ever let people start with
> C if you don't hate 'em.
>
> as for D... current version of D can be used, but with some
> precautions. we now have excellent book by Ali. (it's great, really! i
> believe that it must be featured on the front dlang.org page!) but java
> has alot more books and tutorials.
>
> not that D is bad for beginners, it's just has a smaller userbase. and
> all that things with "classes are reference types and structs are not",
> "empty array is not empty array but is empty array" and so on D may be
> confusing a little. it's good to have some CS background to understood
> that things.

What you say here applies, I guess, to many other points. I applaud Ali for writing a tutorial like his but... Check it (just the first pages is enough) for literally the dozens of notions one must know and master for being able to understand, not only the features of D introduced, but even the tutorial itself. If I am not a programmer, and one who knows other static langs, and better of the mainstream procedural paradigm, if not D itself, then I do not understand more than few isolated words here and there. We are blind to the huge pile of concepts we know, I guess, because we know them, thus take them for granted...

d
October 17, 2014
Ola Fosheim Grøstad:

> The IDE support is probably a bit better with Java/C#

The importance of the IDE for the first language is controversial. I think it's not so important.


> and using a statically typed language as your first language has advantages,

While no one has determined scientifically that you are right, I too believe that static typing has some advantages for a first language. I think there are no perfect first languages.

Bye,
bearophile
October 17, 2014
On Friday, 17 October 2014 at 01:05:37 UTC, ketmar via Digitalmars-d-learn wrote:
> On Fri, 17 Oct 2014 00:52:14 +0000
> MachineCode via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>
>> I don't understand. If at least it were C but java? why not D itself?
> C is *awful* as "beginner's language". never ever let people start with
> C if you don't hate 'em.
>
> as for D... current version of D can be used, but with some
> precautions. we now have excellent book by Ali. (it's great, really! i
> believe that it must be featured on the front dlang.org page!) but java
> has alot more books and tutorials.
>
> not that D is bad for beginners, it's just has a smaller userbase. and
> all that things with "classes are reference types and structs are not",
> "empty array is not empty array but is empty array" and so on D may be
> confusing a little. it's good to have some CS background to understood
> that things.
>
> just my cent and cent.


Better, go with FreePascal http://www.freepascal.org/ and discover all that those features that many C advocates spread as being close to the machine and other C only features, aren't exclusive of it.

Alongside support for real modules, OO and genericity.

Then with a head clean of bad C influences, jump into D.


--
Paulo
October 17, 2014
On Friday, 17 October 2014 at 08:33:46 UTC, bearophile wrote:
>> The IDE support is probably a bit better with Java/C#
>
> The importance of the IDE for the first language is controversial. I think it's not so important.

Perhaps it depends on the person and the language, but I would think autocompletion hints and getting visual cues of syntax errors important.

Error messages with line numbers can be overwhelming, hard to understand and discourage experimentation. Newbies often make many syntactical errors.

Even when doing interactive stuff in python I find ipython a lot more convenient than regular python. Insepecting a class by hitting tab is very useful for learning I think.

>> and using a statically typed language as your first language has advantages,
>
> While no one has determined scientifically that you are right, I too believe that static typing has some advantages for a first language. I think there are no perfect first languages.

That's probably right, because motivation is the most important factor. So even matlab can be a nice environment for learning if it fits your interests.

In general I think Dart could turn into a nice language for beginners. It is dynamic and "a bit forgiving", but has static checking and you can see the results right in your browser (and debug it). But I think the IDE should be mandatory…

October 17, 2014
On Thursday, 16 October 2014 at 22:26:51 UTC, RBfromME wrote:
> I'm a newbie to programming and have been looking into the D lang as a general purposing language to learn, yet the D overview indicates that java would be a better language to learn for your first programming language. Why?  Looks like D is easier than Java...

I agree with Ali. Give it a try, you don't need to use all the fancy features of D, features you only come to appreciate after years of programming (especially in other languages like Java, that are very restrictive).

In D you can start out with very simple code like

import std.stdio;

void main() {
  auto i = 5;
  auto j = 2;
  auto sum = 5 + 2;
  writeln(sum);  // prints 7 to console
}

In Java you already need a lot of boiler plate code for this (a class for main(), i.e. you have to understand object-orientation to begin with!).

If D is too difficult for you, because the tutorials etc. assume that you already know how to program (to a certain extent), you can either ask people on the forum or try a "simpler" language for which there are very basic tutorials, and come back to D later, once you've grasped enough of the concepts that are common to all programming languages.

An "instantly rewarding" language is Lua (lua.org). It was designed for people with no programming background, yet it is very fast and powerful (it's used in gaming a lot). It has some advanced features too (e.g. meta-programming), if you _choose_ to use them (it's not a "scripting for dummies" language).

Personally, I wouldn't recommend an IDE for beginners. It can be confusing at times and even worse, it may spoil you as regards coding habits. The best way to get familiar with a language or coding in general is to use a simple text editor, type everything yourself (at the beginning), and soon it will become second nature to you. It's like learning an instrument, on the one hand you have to practise scales and patterns, and on the other hand you have to learn concepts (chords, chord progressions, harmonies). In order to be able to grasp the concepts, your brain shouldn't be concerned with what your fingers are doing, the fingers should move automatically (so that you can listen to yourself).
October 17, 2014
On Friday, 17 October 2014 at 09:31:45 UTC, Chris wrote:
> An "instantly rewarding" language is Lua (lua.org).
In basic you can easily get simple graphics too, it's really interesting for learning, because your program can perform simple visual tasks: http://www.freebasic.net/wiki/wikka.php?wakka=TutGettingStartedQB

> Personally, I wouldn't recommend an IDE for beginners.
In IDE you press F5 and see the program running.
October 17, 2014
On Fri, 17 Oct 2014 10:10:09 +0200
spir via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> What you say here applies, I guess, to many other points. I applaud Ali for writing a tutorial like his but... Check it (just the first pages is enough) for literally the dozens of notions one must know and master for being able to understand, not only the features of D introduced, but even the tutorial itself. If I am not a programmer, and one who knows other static langs, and better of the mainstream procedural paradigm, if not D itself, then I do not understand more than few isolated words here and there. We are blind to the huge pile of concepts we know, I guess, because we know them, thus take them for granted...
that's why i'm sure that basic programming must be teached in school. hey, the whole our civilization will collapse without computers! computer programming is the literacy of the new age.


October 17, 2014
On Fri, 17 Oct 2014 04:51:14 +0000
via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> I personally think Logo, Processing and Scheme would be more fun as learning tools, but they are throw-away languages.
yet Scheme will teach how to write functional code. it's a valuable knowledge for D programmer.


October 17, 2014
On Fri, 17 Oct 2014 13:13:36 +0000
Kagamin via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

> In IDE you press F5 and see the program running.
with REPL you typing code, pressing "enter" and see the code running.