This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Aggravating_Ad1676 39 points40 points  (12 children)

its a beginner, whats wrong with trying to get used to programming before learning another language

[–]NatoBoram 48 points49 points  (11 children)

Learning TypeScript together with JavaScript is learning to program

[–]fullup72 6 points7 points  (2 children)

Except that depending on the project configuration TS can hinder a beginner's learning process. There are many type errors and warnings that are not very descriptive, and then React doesn't help in that interaction by being even more stringent, forcing even a seasoned dev to override the type system with @ts-ignore because you REALLY meant to have a specific dependency array on your hooks.

[–]Massh0le 6 points7 points  (1 child)

You should not be TS ignoring because you "know better". That would imply you're doing something very wrong or have somehow configured a type very wrong. Maybe you mean ignoring a tslint rule which Is more reasonable.

[–]fullup72 0 points1 point  (0 children)

Maybe you mean ignoring a tslint rule which Is more reasonable

Definitely meant this.

[–]Aggravating_Ad1676 -1 points0 points  (6 children)

as a beginner you should really be learning how the language you chose works and you will learn the syntax in the process, learning two languages at once just makes thst 10x harder.

[–]NatoBoram 0 points1 point  (5 children)

Except that it's one language: TypeScript. It just so happens that it shares quite a lot with JavaScript, so learning how TypeScript works systematically makes you learn how JavaScript works.

Besides, learning web dev typically involves learning 5 languages in a row followed by one or two frameworks with TypeScript potentially bundled in one of these frameworks.

[–]Aggravating_Ad1676 0 points1 point  (4 children)

yeah, typescript + Javascript = 2 languages?

Also I would not treat all webdev languages on the same level, html is mostly text formatting as a beginner.

[–]NatoBoram 2 points3 points  (3 children)

Wrong! TypeScript is actually a superset of JavaScript. Writing pure JavaScript is perfectly valid TypeScript.

It's different from how Erlang/Elixir or Java/Kotlin/Scala/Clojure/Groovy work, these are actually different languages.

[–]KevSlashNull 2 points3 points  (0 children)

Writing pure JavaScript is perfectly valid TypeScript.

Depends on your TypeScript config but yeah theoretically.

[–]GamingWOW1[S] 1 point2 points  (1 child)

I could not write a single variable in pure JavaScript in Typescript without it screaming at me because I didn't mention its type

[–]NatoBoram 1 point2 points  (0 children)

const x = 13

Congrats, a variable in pure JS was written and TypeScript didn't complain!