News for hackers. Stuff that matters.
Re:Office 365 is being completely rewritten in JavaScript by workinthehead on Wednesday June 13, 2018 @08:55AM (#17302568)
every dynamically-typed language has "weird" behaviour around type coercion, that's simply the nature of the beast.

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.

Re:Office 365 is being completely rewritten in JavaScript by pdpi on Wednesday June 13, 2018 @09:24AM (#17302782)
> every dynamically-typed language has "weird" behaviour around type coercion

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.

Re:Office 365 is being completely rewritten in JavaScript by StavrosK on Wednesday June 13, 2018 @09:36AM (#17302879)
I know you know this, but for the GP or anyone else: "Dynamically typed" doesn't mean "strongly typed". Python and Ruby are strongly typed, JS is weakly typed.
Re:Office 365 is being completely rewritten in JavaScript by pdpi on Wednesday June 13, 2018 @01:11PM (#17305042)
Yeah, went for the "picture is worth a thousand words" approach to explaining the distinction :)
Re:Office 365 is being completely rewritten in JavaScript by workinthehead on Wednesday June 13, 2018 @02:15PM (#17305667)
and yet you still managed to misunderstand the point :)
Re:Office 365 is being completely rewritten in JavaScript by workinthehead on Wednesday June 13, 2018 @10:17AM (#17303254)
Thank you for illustrating my point. All of the dynamic languages made different decisions on how to handle type conflicts, there simply is no right or wrong answer.

Oh, and JavaScript is single-threaded. It's impossible to share resources in a single process.

Re:Office 365 is being completely rewritten in JavaScript by pdpi on Wednesday June 13, 2018 @10:33AM (#17303422)
> 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.

Re:Office 365 is being completely rewritten in JavaScript by dragonwriter on Wednesday June 13, 2018 @09:50AM (#17303009)
> every dynamically-typed language has "weird" behaviour around type coercion, that's simply the nature of the beast.

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.)

Re:Office 365 is being completely rewritten in JavaScript by workinthehead on Wednesday June 13, 2018 @10:19AM (#17303273)
Who's to say not doing type coercion isn't weird? Every dynamic language treats things slightly differently.
Re:Office 365 is being completely rewritten in JavaScript by dragonwriter on Wednesday June 13, 2018 @04:35PM (#17306697)
> Who's to say not doing type coercion isn't weird?

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.

Re:Office 365 is being completely rewritten in JavaScript by tom_ on Wednesday June 13, 2018 @09:03AM (#17302627)
Probably this thing, easy to spot in isolation but much harder when part of a larger system:

   > x={}
   > x.fred
   undefined
Actively unhelpful!
Re:Office 365 is being completely rewritten in JavaScript by FridgeSeal on Wednesday June 13, 2018 @09:51AM (#17303022)
> 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

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.