> 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
I'm so sick of these paradigm religious wars. There's nothing wrong with object oriented programming. There's nothing wrong with functional, either. You use them for different purposes. These people like Crockford who talk about "Java programmers are stuck in this inferior way" are the ones who are stuck and not all that educated on programming.
The JavaScript ecosystem is delightfully weird
121–130 of 248 posts
Re: The JavaScript ecosystem is delightfully weird
#122Earlier quoted context omitted.
JavaScript, The Good Parts by Douglas Crockford symbolises this well today https://www.reddit.com/r/ProgrammerHumor/comments/621qrt/jav...
Javascript, The Good Parts, is not really relevant to today's Javascript, unless it's been refreshed. I remember working through it 10+ years ago: * `var` is no longer a thing. * Even `let` is less common now. * Using closures and prototypes to enable functions to be used like classes and have private variables and static variables, have been replaced with proper classes Nowadays if you want to use the good parts of…
where do I find these insane defaults?
Re: The JavaScript ecosystem is delightfully weird
#123Earlier quoted context omitted.
Yeah, but even new documentation sometimes uses promises, particularly anything related to Google like https://firebase.google.com/docs/auth/web/custom-auth
The page has a 2023 last-edited on it, but the code snippet (if you follow the GH link) hasn't been touched in two years. If their JS docs are anything like their Android docs, Google's terrible about updating examples.
Another example from 4mo ago: https://github.com/kubernetes-client/javascript/blob/master/... (the catch at the end is a promise catch)
Re: The JavaScript ecosystem is delightfully weird
#124Earlier quoted context omitted.
Typing wastes time. Teammate and I tried switching a backend project to TS, and I kept a mental note of time spent defining types vs time saved not debugging type-related issues. The result was some high number vs 0. Also messed with the toolchain, making things like Node profiling not work.
Is it a solo project? The time savings of typing is really a function of project size and number of collaborators. For a small, solo project it’s either neutral or a negative.
At my current job we do have a lot of untyped Python used by tons of people, and it's fine. People can read the code without it asserting in every line what each variable is. You just make sure any widely-used APIs are documented properly, which typing doesn't really help with. Also anything modern is more microservice-oriented which comes with nicer boundaries, and everything has tests (which again typing is no substitute for). Typing seems like a mostly outdated thing for application-level stuff.
Re: The JavaScript ecosystem is delightfully weird
#125I am a product of a coding bootcamp from awhile back, so JavaScript is really the only thing I’ve ever known in my career (outside of writing some apps in Visual Basic around 2001). Maybe it’s because it’s the only thing I’ve ever known, but… I like it? I guess if I hack around on a side project and want to use vanilla JS, it’s the Wild West and there’s no rhyme or reason for anything (and everything looks gross). Bu…
JS itself is perfectly fine and quite a nice language when you stick to all its modern idioms that you learned and use today. I think what rankles a lot of people is going through the history of JS when it was terrible and confusing, then basically just jQuery, then the explosion and confusion of server side/node and drama with the company behind it, and finally confusion and drama with moving to modern ES modules. F…
Using a mixture of old, deprecated versions of Webpack, Angular, Babel, and Typescript, and a very big pile of code with plain bad (if not plain wrong) type annotations I wish that statement applied to me.
Constantly attempting to keep all this nodejs stuff without vulnerabilities while migrating the least ammount of stuff at once is a daily challenge.
And that comparison is pretty low bar, everything involving say pytorch is a flaming pile of bad waiting to explode.
Re: The JavaScript ecosystem is delightfully weird
#126Coffeescript 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…
Re: The JavaScript ecosystem is delightfully weird
#127I started writing a small static site generator for myself using JavaScript and QuickJS by Fabrice Bellard[1]. QuickJS is not quite complete, and there are some cross-platform inconsistencies, but overall I found it pleasant to use and its libc wrappers to be powerful enough. I also found that JavaScript is actually pleasant to use when I'm not using classes, or dealing with metaprogramming/Babel, or implicit globals…
what's the use case for quickjs? can it be used for a light-weight runtime for JS on resource restricted embedded devices? by the way, comparing to angular and vue2-vue3, react is actually the one without python2-python3-alike breakages over the years to me, I would say it's the best out of the 3 options(angular,vue,react) so far, which could explain by market share that it remains to be dominant.
My original motivations were: Deno doesn’t support Raspberry Pi and I was running lots of short-lived processes to support incremental rebuilds using a Makefile. In the end, my requirements changed, so I’m not using QuickJS, but it was very easy to pick up and use.
So: portability, startup time, and small code size seem to be the advantages of QuickJS.
Re: The JavaScript ecosystem is delightfully weird
#128> 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…
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.
Re: The JavaScript ecosystem is delightfully weird
#129Delightful? Try managing a monorepo with internal dependencies and multiple target platforms and you will immediately and firmly say 'no'.
Re: The JavaScript ecosystem is delightfully weird
#130I stopped reading after the typo “JavasScript” and then the juvenile tone of “Less that 10 years ago, JavaScript sucked bad.” I have a positive impression of fly.io overall, I mean they admitted they are still figuring out how to build tech at the level of their ambition and have it be reliable enough, but I might like to be a customer one day.
You may be interested to know TC39 makes the same "typo" at https://tc39.es/ right in the biggest header on the page.
> Specifying JavaScript.
Hm, maybe it's not a typo?