Live data from Hacker News

JavaScript is Eating the World

dev.to

291–300 of 323 posts

Re: JavaScript is Eating the World

#291
post #257

Earlier quoted context omitted.

Eh, scroll through the comments in every submission that mentions JavaScript (like this one) and you'll see a bunch of people lambasting anyone that uses JavaScript. "Ugh, why would anyone use it on the server? Idiots!" "Lol web developers only know one language. Sad!" As if anybody that chooses a different set of trade-offs is incompetent, not just comfortable with a different set of trade-offs.

Maybe they say that because they have used better languages, rather than unmet emotional needs.

Languages that are a minimum of 1 year of maturity behind nodejs for the specific use-cases that nodejs is typically used for.

Re: JavaScript is Eating the World

#292

Earlier quoted context omitted.

Once code reaches a certain complexity level (and mind you, the threshold is rather low), you'll need dynamic generation of code and data (or else, write 10x the amount of lines of code). For this to happen in a safe way, you really, really, do need the runtime to be strictly typed.

Are you making this claim about JavaScript or as a general statement? I've probably written less than 1000 lines of JS ever (and that only for hobby projects), but I would strongly disagree with this statement as applied to C++, Java, etc.

My comment is applied to any language with weak typing. Example: Javascript, PHP, and (sadly) C, particularly when using pointers to void. However, in C it's okay since there are big performance gains when you have full control of the memory.

Re: JavaScript is Eating the World

#293

Earlier quoted context omitted.

Strong typing is a start but not enough for my taste. Static typing serves as documentation and compile time bug check, which is awesome to have. I'd like to have both, without the detour over typescript.

I don't think you're going to get strong types in standard JavaScript any time soon. Isn't TypeScript a very good compromise right now?

My take is that having dynamic typing plus strong typing is a (pretty) good compromise. And static typing plus weak typing, insufficient.

Re: JavaScript is Eating the World

#294

Earlier quoted context omitted.

It gets easier once you get use to it. The output is a plain script tag include. Aot is one of the most amazing things I have seen. I can tell when an app uses it and when it is slow.

Do you mean to tell me my 5000 lines script is no longer acceptable?

No, but you do get a dependency tree of 5000 one-liners.

Re: JavaScript is Eating the World

#295
post #290

Earlier quoted context omitted.

Is that a good thing? I would argue that enforcing guidelines can make any type of code base workable. The holy grail is a language that enforces guidelines itself, for example: a type system.

I think static vs. loosely typed both have their pros and cons but that's the thing that's great about the Javascript community. It's not opinionated on things like this. So if you want statically typed, then you can code in Typescript. This is in contrast to something like Rails which is super opinionated and doesn't give you much of a choice if you as a developer or even as a company as a whole were to disagree wit…

This is counter intuitive but choice and freedom are the root of all errors. There is greater power in restriction.

The current movement towards functional programming exemplifies this philosophy.

Re: JavaScript is Eating the World

#296

Earlier quoted context omitted.

I don't think you're going to get strong types in standard JavaScript any time soon. Isn't TypeScript a very good compromise right now?

My take is that having dynamic typing plus strong typing is a (pretty) good compromise. And static typing plus weak typing, insufficient.

What languages would you put in these two categories?

Re: JavaScript is Eating the World

#297
post #255

Earlier quoted context omitted.

There are three players in the game right now all of whom can push updates to the vast majority of their user base very quickly. This isn't a problem like it was back in the day. Now it's pure stubbornness.

4 players (edge, firefox, safari and chrome, and no the last 2 are no longer close). One of them, the usual suspect, is still dog slow to update. But even with that, wasm, service workers and other major changes don't come overnight. The rest of us still have a job to do.

[deleted]

Re: JavaScript is Eating the World

#298
post #246

And here I am desperately looking for an alternative to Node.

What's wrong with everything that came before it?

PHP, Java, .NET, C++, Ruby, Python?

No thanks.

I'm looking at Go, Rust, Erlang, and Crystal. Go seems like the best choice so far.

Re: JavaScript is Eating the World

#299
post #298

Earlier quoted context omitted.

What's wrong with everything that came before it?

PHP, Java, .NET, C++, Ruby, Python? No thanks. I'm looking at Go, Rust, Erlang, and Crystal. Go seems like the best choice so far.

That's not actually an answer, but OK.

Re: JavaScript is Eating the World

#300
post #36

Earlier quoted context omitted.

Few but you likely consider the implementation part of the language.

Count me as one of them. The implementations are what matter. They're the only thing that matters. It's the business axiom "Ideas are worthless, it's the implementation that counts" at work. Ask yourself this: If V8's performance was still at 2010 levels, would Node exist? And if some other language were the one which had been picked for browsers - JavaScript relegated to only running on servers - I wager JavaScript…

V8 is a good runtime implementation for a pretty weak language. Personally I don't think node's existence is a net positive for the world. Ask yourself if we'd be farther ahead if the browsers of 20 years ago ran Perl instead. Anyhow, this entire thread already supports the two ideas that (1) implementation is hugely important and (2) not all issues are language issues per se.
Post reply on HN