←back to thread

160 points todsacerdoti | 3 comments | | HN request time: 0.506s | 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. thefroh ◴[] No.41901424[source]
while I'm a fan of TypeScript and using type hints in Python from an autocomplete and linting perspective, I am curious...

... has either language leveraged these to better tell the CPU what to do? presumably for perf.

replies(2): >>41901441 #>>41901593 #
2. yurishimo ◴[] No.41901441[source]
PHP does but the types actually mean something. If your types can be stripped out to make the program run, I have a hard time believing that there is any optimization occurring there.
3. iforgotmysocks ◴[] No.41901593[source]
python ignores type hints