News for hackers. Stuff that matters.
Re:Office 365 is being completely rewritten in JavaScript by arghwhat on Wednesday June 13, 2018 @06:02AM (#17301720)
> (4x slower, perhaps)

"4x" is a lot slower, and a lot of things are much worse than this. You have to have deep knowledge of the VM (such as knowing how "hidden classes" work in V8) to be able to get JS close to Java.

> so I'll disregard that.

You shouldn't. Claiming a JIT'ed language is fast due to being faster than Python, an entirely interpreted language, is like saying a moped is a fast vehicle because it's faster than biking. Apples and oranges.

Being faster than PyPy, the JIT'ed Python implementation, is a more interesting thing, but this is still very far off "fast" languages.

> What is it missing that makes you hate it so?

Most language features, really. "Everything is an object and objects are hashmaps, EVEN ARRAYS" (terrible for performance, type safety), "array of int16" strings with totally broken unicode codepoint handling (ES2016 brought new ways to deal with codepoints, but the standard way is still broken), the "Number" type which is totally retarted, the terrible "prototype" system, the malice that is "this" and how any bare function expression had its own this context (arrow functions are a good workaround now), and god I could go on.

"Everything is an object" is only useful if you either actually need a hashmap (then use one!), or you have sloppy types.

JS, as a langauge, is not well designed. I'm not saying it had to be Haskell or Rust, but JS is far below average.

It works, and does it job decently due to the very hard work of JS engine implementors trying to make this crazy thing fast, but that's not the same as being good.

Re:Office 365 is being completely rewritten in JavaScript by jhall1468 on Wednesday June 13, 2018 @09:39AM (#17302901)
> 4x" is a lot slower, and a lot of things are much worse than this. You have to have deep knowledge of the VM (such as knowing how "hidden classes" work in V8) to be able to get JS close to Java.

That's a solid argument for only programming in C and Assembly because they are often 4x faster than anything.

> Most language features, really.

AKA, your preferences are "language features".

> Everything is an object

So you don't like Python. Or Ruby.

> the "Number" type which is totally retarted

Very technical argument there.

> the terrible "prototype" system

So you prefer classical inheritance. Cool. Doesn't mean prototypal inheritance is a bad thing.

None of what you mentioned are missing features, they are personal preferences stemming for your own language preference that differs dramatically from Javascript. I'd start by disassociating your opinionated stances from actual weaknesses in the language, of which there are many, and none of them are what you mentioned.

Re:Office 365 is being completely rewritten in JavaScript by bitL on Wednesday June 13, 2018 @06:21AM (#17301803)
> objects are hashmaps

But you still have to compute hashcode yourself :D

Re:Office 365 is being completely rewritten in JavaScript by xamuel on Wednesday June 13, 2018 @09:10AM (#17302676)
>Most language features, really.

Name a few.

>terrible "prototype" system

>malice that is "this"

It sounds like you are talking about ES5, not ES6+

Re:Office 365 is being completely rewritten in JavaScript by bitL on Wednesday June 13, 2018 @09:24AM (#17302785)
Can you guarantee all ES6- code to disappear immediately? Or are you forced to dive deep into warts when you have to work on some older JS project?
Re:Office 365 is being completely rewritten in JavaScript by jhall1468 on Wednesday June 13, 2018 @09:40AM (#17302912)
Wow, now we're complaining about the outdated versions of a language? Come on man. Nobody is going to write a modern application in ES5 and there are plenty of warts in old Java, C and Python applications as well. That's the nature of them being "old".
Re:Office 365 is being completely rewritten in JavaScript by shawnz on Wednesday June 13, 2018 @01:23PM (#17305168)
Why does that impact whether or not it's a reasonable choice to use the language today? Old libraries I could understand, but old independent projects? How do they affect the current state of the language?
Re:Office 365 is being completely rewritten in JavaScript by bitL on Wednesday June 13, 2018 @03:14PM (#17306113)
Isn't it obvious? You apply for a job, company that isn't a startup has code that is likely written with old JavaScript whose replacement is not economical, so even if you do everything new in ES7, you still have to wade through old ugly code, likely everyday.
Re:Office 365 is being completely rewritten in JavaScript by StavrosK on Wednesday June 13, 2018 @09:30AM (#17302823)
> Name a few.

He did, literally exactly after that sentence.

Re:Office 365 is being completely rewritten in JavaScript by xamuel on Wednesday June 13, 2018 @09:40AM (#17302913)
No, he listed some things that he thinks are broken, he didn't list missing language features
Re:Office 365 is being completely rewritten in JavaScript by StavrosK on Wednesday June 13, 2018 @09:46AM (#17302967)
I read it that he meant "fixes for these things are missing and that makes me hate it", i.e. I read it as the answer to your question. He doesn't hate it because it lacks features, he hates it because the existing features are badly implemented/thought-out.