Live data from Hacker News

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

dlang.org

61–70 of 91 posts

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

#61
No.

Sorry but it just isn't. Nor are a whole pile of other interesting and useful programming languages. You need something that offers instant gratification, preferably an interpreted language or a language organized around an interactive prompt.

If I had to teach someone programming today I'd pick JS because it is available everywhere and it doesn't need any tooling at all. It's far from a perfect language but availability and ease of use trump language elegance and correctness. Even if that might mean you have to learn new concepts later and/or unlearn bad habits.

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

#62
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

I think you tossed VB for the wrong reason. It's definitely a general purpose language but it's mostly limited to one platform so that's handled a few lines lower and it would still have led it to be tossed out. I agree with JS over TS for first learning because of the complete lack of a toolchain but later on you probably want to move to TS. Python agreed on as well, Go requires a lot of other knowledge and is a far more advanced eco system already so I'd have ruled out that one as well.

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

#63
post #59
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

On point but C# is now widely available on any OS under .NET (core) iso .NET Framework. It should be included in the shortlist in my opinion.

It's available but not in common use, and where it is used it is used mostly as a portability option (though it is very well possible that is no longer the dominant use, I just haven't seen it used any other way outside of the Microsoft eco-system).

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

#64
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?

JS and Python have taken up that mantle.

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

#65
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

I would say of your four contenders, you eliminated Julia too quickly, it's perfect.

For one reason: it's a dynamic language with types. It's good to have types in a first language, they're too important to neglect. But with Julia, you just introduce them later.

Also, 1 based indexing is easier on anyone who hasn't already gotten used to 0 based indexing, and it's the only language in your last paragraph where zero isn't false.

But it depends more on why they want to learn than anything else. If they want to make web apps, for some reason, obviously JavaScript, and if they like games, it should be Lua. Data and numerics stuff, AI? Julia obviously ;)

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

#66
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

There are various reasons to rule out JS. It's a scripting language for browser engines, it's about as general-purpose as GLSL or ActionScript. Node grabbed it and forced it into a general-purpose suit it wasn't made for, but that's not a good reason to learn it as a first language. It's also simply a poorly designed language.

On the other hand, the reason given for excluding Java is seriously reaching. The JVM isn't "complex" from the student's point of view, and hello world (and other exercises) can be compiled with a simple javac invocation.

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

#68
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

What happened to C? It's the #5 top language and you never ruled it out but it is missing from the final list? It seems like a reasonable first language with simple operations and not much magic happening behind the scenes.

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

#69
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

I think first programming languages need to fit with what the person's motivation is. If they want to do statistics, data analysis and the like then surely Python, R and the like will be a good starting point instead of Bash Shell. Also, the teacher having a very good command of said language as well as all the tools for the environment they'll be using (*nix container, Windows, Mac, etc.) makes a big difference. Things like setting up VS Code to debug something is a daunting task for a beginner with no idea on how to set it up (if they devote themselves to setting it up). Language choice isn't that big of a deal but getting a teacher who knows how to guide the student and teach them everything in said language is (the article shows how the author having a good command of D and knowing said tools taught effectively while he struggled with JS and Lua).

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

#70
post #57

I've taught hundreds of people programming. For one year, at my first real job, I was tasked with teaching the programmers within a big company Pascal. All of them were already professional programmers using Fortran, COBOL, or assembly language. The company had a commitment to modernize their software development practices and one facet of this was to introduce a more modern language--Pascal at that time (circa 1976)…

Limiting to top 30 programming languages based on a particular ranking can be biased and misleading. For January 2024 D TIOBE ranking is 21, just outside Top 20 while your top 6 choice of Julia is outside top 30 at rank 33 [1]. D also support scripting and REPL feature as Julia, but D is much faster at them in which faster feedback is very important for new learners.

For proper pedagogical approach we should refer to the experts and educators. There is one paper from Monash University that have come up with major sins of introductory programming languages that are not suitable for new learners including Pascal that you used during your teaching time. I have provided the link to the paper in my other comment.

[1] TIOBE Index for January 2024:

https://www.tiobe.com/tiobe-index/

Post reply on HN