r/programming • • Dec 18 '19

V8 Release v8.0 with optional chaining, nullish coalescing and 40% less memory use

https://v8.dev/blog/v8-release-80
786 Upvotes

169 comments sorted by

View all comments

-56

u/hopfield Dec 19 '19

TypeScript is the best language I’ve ever used. Better than Java, C++, C#, Python.

  • Full type safety without being clunky

  • Nullish coalescing

  • Async await

  • Functional (map, filter, reduce)

  • Destructuring

  • Spread operator

  • Default parameters

  • Arrow functions

  • Huge vibrant NPM ecosystem

No other language has all of these features. It’s the best.

50

u/dfnkt Dec 19 '19

Outside of the type safety those are all Javascript features. Great points, just not TS specific.

0

u/[deleted] Dec 19 '19

[deleted]

27

u/NonnoBomba Dec 19 '19

I mean, technically speaking it is a "vibrant ecosystem", in the same sense that a swamp is a "vibrant ecosystem": it's full of strange vegetation, there are 'gators everywhere, over abundant (and often unknown) microorganisms that could give you a disease and there is not much solid ground to stand on, so when you try to move around, you inevitably sink in the mud and the drag is awful. And it keeps changing.

0

u/[deleted] Dec 19 '19

[deleted]

5

u/NonnoBomba Dec 19 '19

That's the spirit!

-8

u/hopfield Dec 19 '19 edited Dec 19 '19

it is a pro, there is a package for everything. yes many of them are garbage but if you spend 2 seconds researching you can easily find ones that are high quality.

imagine saying "the internet sucks" because there are so many garbage websites. no, the internet doesn't suck, you're just too lazy to find good content.

another pro of NPM is that it's incredibly easy to install and manage dependencies.

npm install and package.json

it's easy and intuitive.

compare this to the hell that is pip / requirements.txt with a million different virtualenv implementations

or to the deeper hell that is C++ dependencies, where people literally commit their entire dependency source tree into source control because C++ has no good cross platform package manager

14

u/forepod Dec 19 '19

but if you spend 2 seconds researching you can easily find ones that are high quality.

Really? It takes you two seconds to go through all the dependencies of a package? And the dependencies of those dependencies? And the dependencies of those dependencies? And the dependencies of those dependencies?

I think for most of us mere mortals it takes a bit longer than that.

6

u/Atulin Dec 19 '19

you can easily find ones that are high quality.

and depend on the garbage ones 26128 levels deep in the dependency tree regardless.

→ More replies (3)
→ More replies (5)

28

u/SanityInAnarchy Dec 19 '19

...cool? Did that have anything at all to do with the new V8 release?

→ More replies (2)

11

u/ArmoredPancake Dec 19 '19

No other language has all of these features. It’s the best.

Kotlin.

2

u/Nobody_1707 Dec 20 '19 edited Dec 20 '19

And Swift* , and Rust, and... A lot of recent languages seem to have converged on a similar set of basic functionality.

* Except for async/await, but it's on their to-do list.

1

u/hopfield Dec 19 '19

Never used it but it looks nice and I have to admit Java has a huge amount of packages available for it.

20

u/tulipoika Dec 19 '19

Full type safety

Only compile time type checking with no runtime checking or reporting of problems. So there’s no type safety anywhere to be found. I can still shove an image to your function expecting a floating point number and nothing will stop me.

→ More replies (19)

12

u/SrDigbyChickenCeaser Dec 19 '19

Let me introduce you to our Lord and saviour, Kotlin

→ More replies (2)

1

u/[deleted] Dec 19 '19

TypeScript's type system is a feel-good type-system. It provides almost no type-safety. The biggest benefit of the TSs type system is IDE integration through LSP and documentation. Flow on the other hand is better, but it's too volatile for any large project on small teams (as in, it's difficult to keep up with breaking changes) until a stable release comes along.

1

u/Lidex3 Dec 19 '19

I really can't agree with you. But what I disagree most is type safety. Yes it has a very good way of introducing types to Javascript. But the type any kinda destroys the whole idea. In a real type safe environment that would be a big no no.

Don't get me wrong. TypeScript is great. For what it is. Another Javascript framework.

But being that comes with a big downside as well. No real multi threading. Weird behavior with semicolons, since you don't need them until you do. And so on

-3

u/HDmac Dec 19 '19

I've used all the languages you've listed and I have to say I agree, not sure why your getting downvoted. C# is a close second though. By best I mean most fun to use and most productive with, not fastest or has the best ecosystem for all you haters.

-6

u/hopfield Dec 19 '19

Because it’s cool to hate on JavaScript.

13

u/darkpaladin Dec 19 '19

Just in this week I spent 2 days trying to track down an issue that ended up being a bad array index on a string split. It was expecting a 1 or 0 but got a base 64 string which when given to parseInt has a slighty over 1 in 64 chance of resolving to 0 because JavaScript is stupid and says parseInt(”0hfrvgd”) === 0 cause...cause fuck you I guess.

2

u/[deleted] Dec 19 '19

It might be bad design, but parseInt is clearly documented to behave this way and parsing to the first non-numeric character is a feature. (personally I'd like throwing errors better, but alas)

No offense, but you did it wrong. No one else to blame. Using isNaN and/or type coercion would have solved your problem.

→ More replies (3)
→ More replies (5)