Hacker News new | ask | show | jobs
by lkCbdBclE 2560 days ago
When first learning it's more enjoyable to see an idea translate quickly to reality.

JS is great for that purpose. It's very easy to make animations and other fun effects in the DOM or build an extension on top of their favorite site. Once invested they might start research and discover CS fundamentals. Immediately throwing them at typescript without understanding JS could lead to frustration/confusion.

They also might learn an appreciation for things like type safety by not having them. For that reason dynamic languages like Ruby /Python are great. They can execute an idea faster, and if they get frustrated by those types of issues then introducing them to those other languages. Kotlin is cool, but it makes a lot more sense if you have had to deal with null pointer errors before.

2 comments

It's easier to use Kotlin to make fun animations than JavaScript, because Kotlin has better autocomplete. The DOM is neither the only (nor the easiest) presentation layer when you want quick results.

> Immediately throwing them at typescript without understanding JS could lead to frustration/confusion.

I don't understand why you think this would be the case. They could write plain JavaScript in a .ts file and get better error messages. There's no downside.

It's also frustrating to constantly have to check docs for JS libs instead of using autocomplete. A good static type system makes coding much faster and require less memorization of things like parameter order or return types in libraries.

I finally learned Javascript after hating two compsci classes that used Java. I really like Javascript or Python for beginners, I think other languages are too strict and are not "fun" to learn for beginners
Java's strictness used to be tedious and redundant. Don't assume all strict languages work like Java. Type inference in Kotlin, for example, is fantastic.

Strictness with good error messages is much better for beginners. That's why I use the strictest possible language in professional work: if the compiler can do a bunch of work for you, why not let it?

Strictness is like bumper lanes or training wheels.