Do they now?
$ irb
irb(main):001:0> "0" + 1
TypeError: no implicit conversion of Fixnum into String
from (irb):1:in `+'
from (irb):1
from /usr/bin/irb:11:in `<main>'
irb(main):002:0> ^D
$ python
>>> "0" + 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
>>> ^D
$ node
> "0" + 1
'01'
> Meanwhile, those of us using JavaScript simply run one process per core and never worry about contention, deadlocks, or race conditions.If you never worry about those things, then you're either not sharing any resources at all (in which case threads are also dead easy), or you're failing to deal with the shared resources properly.
Oh, and JavaScript is single-threaded. It's impossible to share resources in a single process.
DBs, files, etc etc. in-process memory isn't the only resource you're sharing.
No, that's not true at all. Dynamic languages don't necessarily have type coercion at all, much less weird behavior around it (and, conversely, statically typed languages they have coercion may have weird behavior around it; there's just no link between dynamic typing and weird coercion behavior.)
Well, if someone has to do it, I will: not doing type coercion isn't weird, and doing inplicit type coercion (not strict promotion[0]) is both weird and dangerous.
But, in any cases that's not really the point. The point is that in this...
> Every dynamic language treats things slightly differently.
“dynamic” is irrelevant. Languages have a wide variety of approaches, doing promotion, coercion, neither, or both (though where both are done, it's often just called coercion even when it is promotion), and dynamic vs. static is mostly irrelevant.
[0] that is, where the “from" type has a range that is a subset of the range of the “to” type.so that there is never a change in meaning resulting from the conversion.
> x={}
> x.fred
undefined
Actively unhelpful!Yeah, and I can do the same thing in Python, and it will be equally as lame: both languages are fundamentally single-threaded.
You act as if JS has all problems solved: Erlang/Elixir/Golang have far superior async & parallel stories and will happily thrash JS/Node in performance and efficiency.
How’s it working out for me? Well I do a lot of stuff in Haskell and Rust now, so pretty great actually.
sure wish i knew what you are talking about w/r/t "silently failing". JS has working exceptions just like 99% of widely used languages.
I'm very glad that you've been omniscient enough to determine what "proper" parallel support is, though. How's that working out for you? Meanwhile, those of us using JavaScript simply run one process per core and never worry about contention, deadlocks, or race conditions.