Live data from Hacker News

The JavaScript ecosystem is delightfully weird

fly.io

191–200 of 248 posts

Re: The JavaScript ecosystem is delightfully weird

#191

Earlier quoted context omitted.

That just described how I feel about Typescript - created by Java programmers so that they can feel comfortable and not have to learn how to program in Javascript. I was a Java dev for a decade. It's so much more tedious and less fun than programming in Javascript. I get Java recruiting emails and I shudder. I accept that in gigantic apps worked on by multiple teams, and libraries shared with 3rd parties, Typescript…

> That just described how I feel about Typescript - created by Java programmers Close! C# programmers. :)

[deleted]

Re: The JavaScript ecosystem is delightfully weird

#192

> Less that 10 years ago, JavaScript sucked bad. It had no imports, no classes, no async, no arrow functions No classes in JS was much better than with. As someone who used and contributed to CoffeeScript, I was initially excited by them but in retrospect, they've been a huge negative IMO. Douglas Crockford saw it immediately: https://www.youtube.com/watch?v=PSGEjv3Tqo0&t=300s

> No classes in JS was much better than with. I think you experienced a different JS than I did. JS has always had classes, they were just "harder" to build/use and every "Framework" had a different mixed bag of "utilities" and patterns to work with it and they weren't always compatible. (Mixing jQuery style classes and Dojo style classes was "fun", for two random examples. I could go on all day about the long tail f…

I got quite used to the prototype inheritance style Javascript and really liked it. But I don't think it scales across teams as well as modern JS or Typescript. But for a small project with just myself or a few other skilled developers? I'd prefer old-school style JS semantics.

Re: The JavaScript ecosystem is delightfully weird

#194

Earlier quoted context omitted.

That just described how I feel about Typescript - created by Java programmers so that they can feel comfortable and not have to learn how to program in Javascript. I was a Java dev for a decade. It's so much more tedious and less fun than programming in Javascript. I get Java recruiting emails and I shudder. I accept that in gigantic apps worked on by multiple teams, and libraries shared with 3rd parties, Typescript…

> created by Java programmers so that they can feel comfortable and not have to learn how to program in Javascript. Well... C# .Net developers, as Microsoft found, correctly, that you can't build complex products easily with a lack of types. I also don't think many program in vanilla Javascript; it seems everyone is using JSX.

Jsx is really a templating language, not a replacement for JS. React still involves writing a lot of JavaScript code, and typescript helps quite a bit both with the js and the jsx.

Re: The JavaScript ecosystem is delightfully weird

#195

Earlier quoted context omitted.

It's because they have been bitten by inheritance issues. Classes are great as long as you limit or avoid inheritance altogether. They work so nice with typescript.

Relatedly, it's also because of multi-inheritance issues specifically. React built hooks in part to handle cross-cutting concerns that needed some form of multi-inheritance (mixins and "higher-order components" which themselves were often something of a hack around the existence of strong JS mixin libraries/standards/best practices/meta-programming). The best hooks are an improvement over their HOC counterparts (and…

I was talking about classes as a design pattern, not just react classes.

That said, I don't miss higher order components, but I do find myself reaching for renderprops sometimes. I think it's still a great pattern.

Re: The JavaScript ecosystem is delightfully weird

#196

> Less that 10 years ago, JavaScript sucked bad. It had no imports, no classes, no async, no arrow functions No classes in JS was much better than with. As someone who used and contributed to CoffeeScript, I was initially excited by them but in retrospect, they've been a huge negative IMO. Douglas Crockford saw it immediately: https://www.youtube.com/watch?v=PSGEjv3Tqo0&t=300s

That just described how I feel about Typescript - created by Java programmers so that they can feel comfortable and not have to learn how to program in Javascript. I was a Java dev for a decade. It's so much more tedious and less fun than programming in Javascript. I get Java recruiting emails and I shudder. I accept that in gigantic apps worked on by multiple teams, and libraries shared with 3rd parties, Typescript…

Typescript's type system is vastly different from Javas, and if you're using it that way you're missing most of the good parts.

The great thing is it's powerful enough that you don't lose JS's dynamic features, but your code becomes much more self documenting and clearer, and your IDE has a much better idea how to support you. I would never go back to vanilla JS, typescript saves me way too much time and from too many headaches.

Re: The JavaScript ecosystem is delightfully weird

#197
post #7

Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…

What do you think about Deno?

Not a fan, for one reason in particular: they allow URL imports[0]. It's a massive uptime and security flaw in my opinion that was added because someone asked for it. It's been asked for on the Node repository as well where it's received mixed feedback (namely, negative feedback from several core contributors) due to it being, well... a dumb idea.

I've never seen the need for Deno. Every library I've written that has more than a few hundred users has inevitably been spammed about "Deno support when?" which also turned me off from it.

[0] https://deno.com/manual@v1.0.0/linking_to_external_code

Re: The JavaScript ecosystem is delightfully weird

#198

Earlier quoted context omitted.

Have you tried VS Code or WebStorm? They are both independent debuggers. They are quite good for debugging in my experience. I don't know that they offer profiling capabilities.

I confess that such IDEs and their plugins are not my cup of tea and have not given them a fair chance. Though I am skeptical, with the many inconsistencies that runtimes present even for Chrome, perhaps they do work and I may give them a fair try. Still, unwilling tight coupling with an IDE is still quite unsatisfactory.

It's not really a tight coupling at all in VSCode's case. Open your folder, let it generate a small launch.json in a hidden dot directory, and that's basically all there is to it. It's not like some heavy Java/C++ kind of thing where you need some massively complicated build system and project file.

Re: The JavaScript ecosystem is delightfully weird

#199

Earlier quoted context omitted.

Not sure what language you were coding in but I remember actively hating it 5-10 years ago and definitely didn't think "it's actually good now". It was always getting better of course, but even these days there's lots of problems that would prevent me from saying "it's actually good now". The Web APIs are pretty lacking: * WebUSB has only been available for a couple of years * WebGPU is only now becoming a thing desp…

I mean that at any time it was extremely common to see something like "well yes it was bad [amount of time ago], but now it's actually good!" Before long that "actually good" is lumped in with the time when it was bad... but now, of course, it's actually good!

If something continuously improves then you'll always have people saying that as it crosses their personal threshold of "good". That doesn't mean they're wrong or that there is any contradiction. If you ask the same person what year javascript became good, their answer is not likely to change much over time.

Re: The JavaScript ecosystem is delightfully weird

#200

I like javascript, but I always think about the time when I was working as a front end developer, and a guy across the room suddenly stood up, walked over to the white board, and wrote "F*CK JAVASCRIPT" in massive letters. I believe his concern was around the lack of type safety (this was before we used Typescript). And this was someone not prone to dramatic gestures. At the time I laughed. Guy must be having a bad d…

> I am fed up with React, and the entire javascript ecosystem in general. The trend-based, article-driven development, the new framework/pattern you have to learn/unlearn every six months, the SPAS that made a simple web app spool up the user's laptop fan with all the javascript it was processing just to do basic stuff we could do much more simply in the 90s. I must be living in a parallel world cause I write React &…

Yeah that’s right. I think a lot of JS devs are jumping on fads but it’s absolutely not a requirement. Just pick a couple of well supported projects for the stuff you really need and stick with it.

I’d much rather have some dependency discipline and a vibrant fast-moving ecosystem than the opposite. Just pick the fruit of other people’s labor when it’s ready instead of dogfooding questionable and bloated deps.

Oh yeah and do not read medium articles about JS.

Post reply on HN