I enjoyed that year and, for the most part, my "students" were easy to teach, and Pascal held up well. They were all programmers already, so I didn't have to go slow through the basics and introducing ideas like recursion (absent in Fortran, COBOL, and assembly language of the period) kept the classes new and interesting to the students.
Unfortunately, standard Pascal isn't really a good choice for a first programming language today, even though modern Pascals have removed many of early Pascal's limitations (packages, batteries included libraries, etc.)
So, how can we decide if a language is a viable first language? Employing the wisdom of crowds, here are the top 30 languages in the 2023 IEEE Spectrum rankings:
1-10: Python, Java, C++, C, Javascript, C#, SQL, Go, TypeScript, HTML.
11-20: R, Shell, PHP, Ruby, SAS, Swift, Dart, Rust, Kotlin, Matlab.
21-30: Scala, Assembly, Perl, Visual Basic, Objective-C, Lua, Fortran, Verilog, Groovy, Julia.
I contend that we should limit our choice of first-languages to some language in the top 30. This rules out many languages that I consider important, but we should stick with a language that is likely to benefit the student more than others as a first-language. That means not teaching Lisp or Racket or Ada or Ocaml or Prolog or even D for that matter as a first language.
To narrow our top 30 down to a handful of alternatives, I'm going to use my own subjective difficulty rating and remove C++ and Rust and Scala from the list because they will be too hard for beginners.
Furthermore, let's remove languages that aren't general purpose; this knocks out SQL, HTML, R, Shell, PHP, SAS, Matlab, Assembly, Visual Basic, and Verilog.
Some languages require more complex build or execution environments; I would remove Java, Dart, Kotlin, and Groovy from our list for this reason.
Finally, there are some languages that are not as easy to use outside of specific hardware or operating systems; I consider these languages C#, Swift and Objective-C to be ruled out.
For good measure, I'm removing Perl from the list (a bit too irregular) and Fortran (not widely used outside of some important areas).
Our condensed list now look like this:
Possible first languages: Python, JavaScript, Go, TypeScript, Ruby, and Julia.
To narrow it down even a bit further we can observe that one should learn JavaScript before learning Typescript. (Is this opinion shared by HN?)
Ruby and Python seem like close cousins with Ruby being a bit prettier and Python being much much more popular.
Julia is a bit specialized and a bit harder than the others so now we are left with just three: Python, JavaScript, and Go.
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:
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 ;)
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.
Just a nitpick, but modern PHP is definitely a general-purpose language, and quite a decent one. Assembly is also inherently general-purpose, and might have a much higher learning curve, but its foundational nature also makes it an important step in a layered approach to learning (a la Nand2Tetris).
I can see why people think the tool chain may be hard for adults, but if the focus is on children learners, you can get Lua with the batteries included.
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.
Teaching something, like a programming language, that you don't know is really hard. But in this case there are 100's of Lua tutorials around Roblox. I would think that they could have done that.
While it's $15 per learner, an alternate could be Pico-8 https://www.lexaloffle.com/pico-8.php Lots of tutorials and lots of demos to look at.
8<-------------
I spend an inordinate amount of time helping the kids set up their build environments, and having this built-in to the IDE or dub would be immensely helpful for using D for learning.
8<-------------
it does seem to have worked out in the end, but I would personally not have considered anything where building was not one click of a button in an ide; build toolchains add a tremendous amount of complexity to learning a new language, and especially if this is also an intro to programming I would consider it a fatal lack.
Don't underestimate how important that integrated experience is. Within their first month or so they were already using a real graphical debugger which is something I didn't pick up until much later because of where I started.
Teaching D from Scratch: Is it a viable first language? - https://news.ycombinator.com/item?id=29711800 - Dec 2021 (74 comments)
There is no text based language (please correct me if I have missed one) that makes any attempt to bridge this gap by providing a library of assets on tap. Yes there are places you can find sprites etc, but they are not just there, included. I feel this has been the biggest stumbling block for my daughter moving on from Scratch. To produce something in a text based language that even comes close is so much more work, anything that is achievable just isn't stimulating enough.
We have looked at Roblox, I agree with the article this has potential, making a moving platform in an obby for example, but this hasn't stuck with her. We have had more traction with custom ents in Minecraft, creating in Blockbench then messing with the configs to alter the behaviour, but this is just Mineraft specific.
I should hope to do more with js/ts scripting in Minecraft, but using bedrock this is in it's infancy so there isn't much out there for inspiration, hacking around with or tutorials for her to look at herself. In this regard, D is no better a first language than any other.
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.
It seems to be a Minecraft mod maker that simplifies the process of building a mod.
There's a page specifically about education: https://mcreator.net/education
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.
How far into Minecraft modding have you gotten?
I wonder if they meant Lua or its integration with Roblox was too advanced. I would think Lua is a simpler and easier to learn language relative to Javascript and D.
Similarly the best way for a learner to stay motivated is to make something they are personally invested in, which usually involves integrating with something. With lua you need to get your hands into the toolchain and distribution stuff very early to do that, which has nothing to do with programming per se and is frustrating and disorienting for a newcomer.
I've taught people to code from scratch and lua is a worse-than-average language for it. It's a small language but that doesn't help a total novice very much. It's the core concepts of programming that is difficult for them, not memorizing language features. The only situation where I would use it is if they have a specific motivating goal that uses it, usually yes roblox.
I've noticed when messing around with Scratch, he quickly progressed from leaning the language to using the language to solve his own problems. He moved from following tutorials to creating his own games and ideas quickly.
When playing with the the Roblox editor he would follow the Youtube tutorials, but never made the leap to making his own games. Roblox scripting is fairly wordy, you spend a far amount of time binding methods to long event handlers. There is a lot of text you have to type, and spell correctly, and remember. 10 year olds are very slow typists. I also spend a fair amount of time helping him fix small syntax errors which slowly sapped his enthusiasm.
The drag and drop, and drop downs in Scratch really helped him move quickly from learning the language, to using the language to make games.
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.)
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?
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 so will have major crossovers with most others
I fail to see how D is that extreme compared to most other languages or any reason it should be pedagogically dismissed as a first language
Most people don't setup their own environment for their first language....
Not everything is about work, especially for children.