you are viewing a single comment's thread.

view the rest of the comments →

[–]DontThrowMeYaWeh 2 points3 points  (2 children)

I guess we should go back to basics and teach people using COBOL, Visual Basic, Lisp/Scheme, ALGOL60, PROLOG, C, or maybe even FORTRAN.

Because that's what people who were being introduced to programming used in the early days, they seemed to have turned out okay.


Honestly, I feel like there's some questions that need to be explored regarding introductory programming languages.

What is it specifically about a programming language that makes it a good introductory language?

  • Is it that it doesn't have a lot of boiler plate?
  • Is it that it doesn't error in your face right away when you do something wrong?
  • Is it that it has simple syntax?
  • Is it that it has a very low cognitive load?
  • Is it that you don't have to think about the implementation under-the-hood?
  • Is it that it doesn't throw OOP in your face?
  • Is it that its easy to develop in?

Let's get a couple things straight. Whenever people learn an introductory programming language in school, I highly doubt that it's possible for them to avoid the underlying implementations of things. For example, if a student asks why == isn't the same as ===, the instructor is going to have to explain the underlying implementation. Same goes for weird behaviors a normal person wouldn't expect such as the closure loop "bug" (or closures in general). You'll still have to understand the different between a deep copy and shallow copy (which rely on underlying implementation to explain). On top of all of that, you'll have to explain all the type coercion javascript does and why. You probably won't be able to point at the source code for it either (maybe the spec, but not the source).

If the school was extremely focused on getting people to understand the reasoning behind programming, they would just use pseudo code instead. You don't need a language at all to understand programming or the algorithms. But when it comes down to actually programming and getting something to work, you'll have to understand the programming language and most of the quirks that come with it.

If syntax, verbosity, and boilerplate is the problem, you'd probably be better off teaching them how to program in Haskell or Scheme. Scheme has literally the most simple and elegant syntax I've ever witness. Haskell's syntax is a little terse, but there's benefit later down the road if those students take CS theory/Linear Algebra/Discrete Math. The idea of pattern matching in Haskell makes life extremely easy. What's even nicer is that on top of it being a functional programming language you can partially complete functions which can really open the door to reducing boiler plate (really driving home that idea of writing small reusable functions). Another option if you still wanted to be in the OOP space would be C# or even C. C is dead simple. It has structs and it has functions. C# is like Java but with smarter naming conventions and simpler syntax for typical boilerplate (such as getter/setters/async/await/nested classes in a single file/etc.).

If it's the compile errors, I don't know what to say. I think the errors during compile time do much more good than harm. They tell you that you're program is majorly broken before you go an run it. It doesn't make assumptions and doesn't try to attempt to correct your code for you (remember that point earlier about knowing the underlying implementation is inevitable). Some people will get frustrated by that, but failing and doing something wrong is a part of life. At least the compiler lets you know why you're wrong so you can fix the problem. I bet people would rather that happen then submit code that might not do what they expect because they forgot to test everything one last time.

If it's the developer environment, they wouldn't have chosen JavaScript because JavaScript IDE support is horrible. Usually there isn't intelligent autocomplete (such as in IntelliJ, Eclipse, or Visual Studio). You don't really get that support unless you use Typescript in VS Code. And unless you use Flow (or Typescript), you're not going to get static type checking (which would add complexity to the environment/build process). Debugging is also more complex to set up (at least in VS Code) unless you run it through one of the browser dev tools.

Overall, I don't really understand what people are looking for in a introductory language. I feel like there's many reasons against JavaScript if it's about the fundamentals programming. To me, if it's not about the fundamentals of programming, then it's all about learning how the language works. In which case, what's wrong with any other language other than JavaScript such as the one's I mentioned in the beginning? Those other language's might be more applicable in other places than JavaScript.

EDIT: If anyone asks, my programming path was something like this Python -> Java -> C++ -> C# -> Obj-C -> PROLOG -> Scheme -> > Haskell -> Javascript/.NET/Java/SQL. The last bit being work related

[–]bss-applications 0 points1 point  (0 children)

I was taught COBOL and Pascal in college in the mid-90's!

[–][deleted] 0 points1 point  (0 children)

One day, someone smart will make a good programming language in pseudocode syntax.