←back to thread

160 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
Jean-Papoulos ◴[] No.41901260[source]
This guy is not competent to talk about what he's talking about.

>"JavaScript is, in my opinion, a working-class language. It’s very forgiving of types (this is one reason I’m not a huge TypeScript fan)."

Being "forgiving of types" is not a good thing. There's a reason most "type-less" languages have added type hints and the like (Python, Typescript, etc) and it's because the job of a programming language is to make it easier for me to tell the CPU what to do. Not having types is detrimental to that.

replies(9): >>41901279 #>>41901424 #>>41901541 #>>41901590 #>>41901822 #>>41901921 #>>41902028 #>>41902107 #>>41902656 #
1. mkl ◴[] No.41902656[source]
> the job of a programming language is to make it easier for me to tell the CPU what to do. Not having types is detrimental to that.

JavaScript and Python have types, and Python has always been strongly typed (type hints have not changed that). Neither TypeScript or Python use type hints at runtime to help tell the CPU what to do.

What type hints in these languages do is make it easier for you to describe more specifics of what your code does to your tooling, your future self, and other programmers.