←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 #
Doxin ◴[] No.41901279[source]
> There's a reason most "type-less" languages have added type hints and the like (Python, Typescript, etc)

I would like to clarify that even without typing python is a LOT less "forgiving of types" than javascript. It has none of the "One plus object is NaN" shenanigans you run into with javascript.

replies(2): >>41901348 #>>41901491 #
1. makapuf ◴[] No.41901348[source]
Types are guidelines and strictly useful and a good thing. That said, one can wonder why languages like basic, python, scheme or php (dynamic, implicit types) have grown popular. Maybe for bad reasons but there IS an added value for implicit types. C++ (maybe even C !) has grown the auto keyword and other typed language have type inference. Which is not the same as "typeless" (it always is typed) but it defeats one of the "double check" security of types. And it's sometimes not needed (yes, if I initialize it with "abc" it may be a string)