If you want a compiled language with strong types, Swift actually is a very nice language for learning. It has very nice ergonomics, and the Swift Playgrounds iPad apps are really nice and engaging.
Teaching D from Scratch: Is it a viable first language? (2021)
51–60 of 91 posts
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#52> After half a year we moved on to our second language: Lua, specifically in the video game system Roblox. I almost wish we had skipped this one because it was a bit too advanced for these students 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.
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#53Re: Teaching D from Scratch: Is it a viable first language? (2021)
#54> After half a year we moved on to our second language: Lua, specifically in the video game system Roblox. I almost wish we had skipped this one because it was a bit too advanced for these students 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.
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.
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#55Earlier quoted context omitted.
> Why teach someone a language they can’t use at work? Not everything is about work, especially for children.
If you don’t teach children to succeed at work and get ahead you are knowingly putting them at a disadvantage. If I knew programming when I was much much younger I would be in an even better position than I am now, and I’m in a great position.
(Source: Raised two children to adulthood.)
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#56Re: Teaching D from Scratch: Is it a viable first language? (2021)
#57I 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.
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#58I 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…
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
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#59I'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)…
Re: Teaching D from Scratch: Is it a viable first language? (2021)
#60I'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 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.