Live data from Hacker News

Teaching D from Scratch: Is it a viable first language? (2021)

dlang.org

21–30 of 91 posts

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#21
post #12

I think Scratch makes a great introduction to programming because of the playfull assets which are bundled with it, sprites, sounds, backgrounds etc. This significantly lowers the bar to making something productive and visually stimulating, something which I believe is necessary to engage when competing with modern games, phones etc. There is no text based language (please correct me if I have missed one) that makes…

We need another BASIC.

How far into Minecraft modding have you gotten?

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#22
post #16
post #8

> I am confident that D can be a viable first language Not sure what this confidence is based on, the basics are broken (toolchain, basic syntax errors you shouldn't even need a compile step to figure out, the squiggly error underline should be right there in your editor!), and what does sticking to "Vanilla D" offer as a benefit vs. some other language?

I’m not sure that the choice of the language matters a great deal for an intro course to be honest There’s no way students can wrap their heads around advanced topics to the point where language selection matters that much Of course toy languages like Brainfuck, low level stuff like pure assembly or archaic languages like COBOL would be detrimental to learning. But any mainstream language from the last forty years or…

Well, syntax and intuitiveness of composition of programming basics matters, and those are different

But D's "extreme" is in its unpopularity, so student exploration is very limited

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#23
post #16

Earlier quoted context omitted.

I’m not sure that the choice of the language matters a great deal for an intro course to be honest There’s no way students can wrap their heads around advanced topics to the point where language selection matters that much Of course toy languages like Brainfuck, low level stuff like pure assembly or archaic languages like COBOL would be detrimental to learning. But any mainstream language from the last forty years or…

It really does matter at least according to this paper [1]. However I think the paper missed one major sin of not having a GC for introductory programming language. D actually avoids most of these sins and it is GC by default. [1] Seven Deadly Sins of Introductory Programming Language Design: https://users.monash.edu/~damian/papers/PDF/SevenDeadlySins....

Not sure I agree. GC is essential in industry (well, I'd argue that! Ignoring embedded anyway) but I think the programmer has to understand the real cost, and that means allocating and de-allocating, and if that is hidden by the GC then they're not learning that.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#24
post #22
post #16

Earlier quoted context omitted.

I’m not sure that the choice of the language matters a great deal for an intro course to be honest There’s no way students can wrap their heads around advanced topics to the point where language selection matters that much Of course toy languages like Brainfuck, low level stuff like pure assembly or archaic languages like COBOL would be detrimental to learning. But any mainstream language from the last forty years or…

Well, syntax and intuitiveness of composition of programming basics matters, and those are different But D's "extreme" is in its unpopularity, so student exploration is very limited

In what way are they different?

"Different" for me is Lisp or Haskell. D is a crossover between C++ and Java in my (albeit limited) experience.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#25
post #16
post #8

> I am confident that D can be a viable first language Not sure what this confidence is based on, the basics are broken (toolchain, basic syntax errors you shouldn't even need a compile step to figure out, the squiggly error underline should be right there in your editor!), and what does sticking to "Vanilla D" offer as a benefit vs. some other language?

I’m not sure that the choice of the language matters a great deal for an intro course to be honest There’s no way students can wrap their heads around advanced topics to the point where language selection matters that much Of course toy languages like Brainfuck, low level stuff like pure assembly or archaic languages like COBOL would be detrimental to learning. But any mainstream language from the last forty years or…

> I’m not sure that the choice of the language matters a great deal for an intro course to be honest

Huge disagreement from me! The choice might not matter for the already motivated students who were going to learn to code no matter the language, but for folks on the fringe of CS the language matters immensely. There are arguments to be made about frustration, developer experience, grokability, but imo the most important is distance between code and gui. It’s very motivating to build something you can interact with. It’s very demotivating to work on contextually-meaningless algorithm problems.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#26
Pretty much anything can be a viable first language. My first language was 1980s BASIC, starting with very limited version (ZX80 and then Grundy Newbrain). I do not think that was a good first language though. It did not teach good habits, and it lacked a lot of concepts I had to start learning later.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#27
My first program was in BASIC. I was 6, and had other things to do before I got back on that journey, but the next one was in PHP.

By conventional wisdom and common proverbs, my mind should've been mutilated beyond any hope of recovery. (And maybe it is, who knows.) But this conventional wisdom tends to ignore the barrier to entry.

The C64 not only booted straight into BASIC, it also came with a book, and that first program that I copied from the book was not some silly "hello world" or a fizzbuzz, it was a piano. It demonstrated to me, that a computer is a means of expressing yourself creatively, and it did so in a form that was digestible to a 6yro.

The best first language is the one that comes pre-installed on your computer, with enough example code to get you hooked. (Which is why the iPad / Swift Playgrounds fills me with both hope and dread. But, considering where I came from, mostly hope.)

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#28
post #23

Earlier quoted context omitted.

It really does matter at least according to this paper [1]. However I think the paper missed one major sin of not having a GC for introductory programming language. D actually avoids most of these sins and it is GC by default. [1] Seven Deadly Sins of Introductory Programming Language Design: https://users.monash.edu/~damian/papers/PDF/SevenDeadlySins....

Not sure I agree. GC is essential in industry (well, I'd argue that! Ignoring embedded anyway) but I think the programmer has to understand the real cost, and that means allocating and de-allocating, and if that is hidden by the GC then they're not learning that.

This is something much, much more easily learned with your second, or maybe even third programming language rather than with your first.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#29
post #12

I think Scratch makes a great introduction to programming because of the playfull assets which are bundled with it, sprites, sounds, backgrounds etc. This significantly lowers the bar to making something productive and visually stimulating, something which I believe is necessary to engage when competing with modern games, phones etc. There is no text based language (please correct me if I have missed one) that makes…

The "Visual" series of IDEs used to exist. Also the "Builder" series from Borland.

It was the reason why Delphi (a kind of Visual Pascal Builder?) Was só stupidly popular. Same thing for Visual Basic.

I used to look down on then but now I realize they being gone is a bad thing.

Re: Teaching D from Scratch: Is it a viable first language? (2021)

#30
post #12

I think Scratch makes a great introduction to programming because of the playfull assets which are bundled with it, sprites, sounds, backgrounds etc. This significantly lowers the bar to making something productive and visually stimulating, something which I believe is necessary to engage when competing with modern games, phones etc. There is no text based language (please correct me if I have missed one) that makes…

One of my favorite professors was using Processing, which was confusing for some, but it really helped that the students got to visually see results.

I have to wonder if we allowed people to learn programming significantly better when RAD IDE languages were more common like VB6 and Delphi. Something about visually seeing what you're building vs just seeing text on a screen. I guess it would only affect SOME people learning to code this way, because we have plenty of brilliant minds who had even less than a terminal at one point or another.

Post reply on HN