November 04, 2013
On Monday, 4 November 2013 at 16:22:52 UTC, Gary Willoughby wrote:
> On Monday, 4 November 2013 at 15:58:48 UTC, Chris wrote:
>> "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."
>> (http://dlang.org/overview.html)
>
> I'd argue against this. I think D would make a terrific first language. Remember, you wouldn't start with metaprogramming on day one. If you started with the basics using simple syntax and introduce the compiler incrementally it would be very educational. IMHO new programmers should start by learning how memory works, what binary is, how big built-in types are, etc. I am continually amazed when working with seasoned developers who have no idea why floats aren't precise, what a pointer is or what or bit-shifting does. It's staggering.

We need an environment with lots of instant gratification. This is more important than language features. People even use C++ as first language due to libraries like Cinder. http://libcinder.org/
November 04, 2013
On Monday, 4 November 2013 at 17:30:58 UTC, qznc wrote:
> On Monday, 4 November 2013 at 16:22:52 UTC, Gary Willoughby wrote:
>> On Monday, 4 November 2013 at 15:58:48 UTC, Chris wrote:
>>> "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."
>>> (http://dlang.org/overview.html)
>>
>> I'd argue against this. I think D would make a terrific first language. Remember, you wouldn't start with metaprogramming on day one. If you started with the basics using simple syntax and introduce the compiler incrementally it would be very educational. IMHO new programmers should start by learning how memory works, what binary is, how big built-in types are, etc. I am continually amazed when working with seasoned developers who have no idea why floats aren't precise, what a pointer is or what or bit-shifting does. It's staggering.
>
> We need an environment with lots of instant gratification. This is more important than language features. People even use C++ as first language due to libraries like Cinder. http://libcinder.org/

Both are equally important. Instant gratification instead of frustration is important. And with D you can get both. One can write simple programs (e.g. readText()) and if needs be dig deeper and see what's going on under the hood. I wouldn't sacrifice features for gratification. Good features attract experienced or highly specialized programmers, while easy high level features help newbies to get up to speed.
November 04, 2013
On Monday, 4 November 2013 at 17:12:34 UTC, PauloPinto wrote:
> Well I was looking at Z80 Assembly code at the age of 12.

 I did x86 Assembly language at 14. Made my own compiler too, although I discontinued it as it was inferior to NASM, and only allowed you to make .com files. Still that was a fun time.

 On the other hand I recall extending the assembly language in my own compiler (as safe mini-macros).
November 04, 2013
On 11/4/2013 11:22 AM, Gary Willoughby wrote:
>
> I personally also think BASIC is a total waste of time for beginners. I
> does something to peoples minds that once they learn it, they never want
> to use anything else ever again. I totally agree with the following quote:
>
> "It is practically impossible to teach good programming to students that
> have had a prior exposure to BASIC: as potential programmers they are
> mentally mutilated beyond hope of regeneration." -Edsger W. Dijkstra
>

Bah. I started with various flavors of basic, then moved straight to C/C++ and a little bit of 6502 machine code, and then to a bunch of others including D. I've known other people who have successfully done much the same.

Dijkstra's full of shit on that one.

November 04, 2013
On 11/4/2013 12:10 PM, Craig Dillabaugh wrote:
>
> While D code can quickly become complex relative to Java, at the
> same time I think in a beginner course/book could easily be geared
> to keep away from D's fancier features and just teach basics.
> For example, code for reading a text file in in Java is (top
> answer on SO):
>
> static String readFile(String path, Charset encoding)
>     throws IOException
> {
>     byte[] encoded = Files.readAllBytes(Paths.get(path));
>     return encoding.decode(ByteBuffer.wrap(encoded)).toString();
> }
>
> vs.
>
> readText(filename)
>
> in D. Not really up on Java these days, so perhaps Java now
> includes a readText() like method now.  Anyway, hard to beat the
> D version for
> easy!
>

Yea. In college, I was a CS tutor for the first year programming students. This was at a school that used Java. I can personally vouch that Java's a terrible language for beginners. (Well, and for everyone else, really ;) )

A major part of the problem is Java's religious fervor for OO. There's a natural tendency for the students to end up being taught OO *before* they have a sufficient grasp on flow-of-execution (In fact, Java makes it difficult for the teachers to avoid doing that.) But, OO is an *architectural* concept that's completely meaningless (and in my observations, extremely confusing) without some form of either imperative or declarative foundation.

The other issue is Java's insane amount of boilerplate. Great way to teach beginners that programming is tedious.

November 05, 2013
On 11/4/2013 2:34 PM, Era Scarecrow wrote:
>   I did x86 Assembly language at 14.

Bah. I programmed the Apollo lunar module computer for NASA when I was 8.
November 05, 2013
On Tuesday, 5 November 2013 at 01:15:11 UTC, Walter Bright wrote:
> On 11/4/2013 2:34 PM, Era Scarecrow wrote:
>>  I did x86 Assembly language at 14.
>
> Bah. I programmed the Apollo lunar module computer for NASA when I was 8.

XD
November 05, 2013
On 11/4/2013 6:28 PM, deadalnix wrote:
> On Tuesday, 5 November 2013 at 01:15:11 UTC, Walter Bright wrote:
>> On 11/4/2013 2:34 PM, Era Scarecrow wrote:
>>>  I did x86 Assembly language at 14.
>>
>> Bah. I programmed the Apollo lunar module computer for NASA when I was 8.
>
> XD

?
November 05, 2013
On Tuesday, 5 November 2013 at 02:31:25 UTC, Walter Bright wrote:
> On 11/4/2013 6:28 PM, deadalnix wrote:
>> On Tuesday, 5 November 2013 at 01:15:11 UTC, Walter Bright wrote:
>>> On 11/4/2013 2:34 PM, Era Scarecrow wrote:
>>>> I did x86 Assembly language at 14.
>>>
>>> Bah. I programmed the Apollo lunar module computer for NASA when I was 8.
>>
>> XD
>
> ?

http://fr.wikipedia.org/wiki/XD The first one is the right one here.
November 05, 2013
On Mon, Nov 04, 2013 at 06:12:33PM +0100, PauloPinto wrote:
> On Monday, 4 November 2013 at 16:49:10 UTC, simendsjo wrote:
> >On Monday, 4 November 2013 at 16:22:52 UTC, Gary Willoughby wrote:
> >>On Monday, 4 November 2013 at 15:58:48 UTC, Chris wrote:
> >>>"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."
> >>>(http://dlang.org/overview.html)
> >>
> >>I'd argue against this. I think D would make a terrific first language.
> >(...)
> >>
> >>Something like C or D (i'd opt for D) should be any devs first language. Simply to educate them in the basics.
> >
> >I would say that it really depends on the age too. D as a first language for an 18 year-old technically savvy person might work, but for a 10 year-old?
> 
> Well I was looking at Z80 Assembly code at the age of 12.

I started programming Applesoft BASIC around that age too, and when I was 14 or so, I was programming in Motorola 6502 assembly language. When I was 16 one of my assembly programs was sold in a bookstore. Thereafter I moved on to Intel 8088 assembly language. It was only years later, in college, that I learned C and C++.

I think BASIC introduced me to the concept behind imperative programming, even if at the time it has almost no structured constructs and most programs were just GOTO spaghetti soup. Going from there to assembly language was actually not that much of a stretch, and with big performance payoffs, too.

Of course, the world has moved on since those days, so nowadays we don't usually bother with that level of performance fine-tuning except in performance critical bits of code.

But anyway, w.r.t. the OP, if I were to be in charge of designing a curriculum, I'd put assembly language as the first language to be learned, followed by a good high-level language like D. On this, I agree with Knuth's sentiments:

	By understanding a machine-oriented language, the programmer
	will tend to use a much more efficient method; it is much closer
	to reality. -- D. Knuth

	People who are more than casually interested in computers should
	have at least some idea of what the underlying hardware is like.
	Otherwise the programs they write will be pretty weird. -- D.
	Knuth


T

-- 
Без труда не выловишь и рыбку из пруда.