i have a confession
i actually kinda like JS. if you leave out inheritance, program in a pseudo-functional style, and don't get distracted by the 500 new frontend frameworks and build tools that come out every week, you can be super productive in JS.
i think JS gets a lot of hate because it kinda sucked for a long time, but it sucks a lot less now.
@zacanger It did a lot of good, IMO it played a significant role in popularizing first-party async features in languages (and higher-level parallelism abstractions than plain threads).
(but I still don't really like JS because of a lot of the fundamental design decisions are frankly asinine)
@elomatreb you're right, teaching people about monads through promises is actually a lot easier than teaching people about monads through math, for example
@zacanger IMO the best monad example is Maybe/Option, but that has so few applications in scripting languages sadly
@elomatreb i've seen libraries that go all out with category theory in JS and have a Maybe monad, but you're right, i can never think of good places to work that into js applications
@zacanger I find myself wanting a Option type in Ruby in some circumstances, e.g. to build a combination of a map and a filter operation (Rust's iterators use Options to build filter_map for that, which is really nice)
@elomatreb ooooh, that's neat
@besserwisser i've never read that, but i probably should at some point, i know that's a very popular series.
a lot of the legacy frontend code i run into is like that: "here's a library, copy and paste this stuff, don't bother learning the language, just copy-paste this example"
@zacanger I don't hate JS because of its feature set or its 666 different frameworks that exist for other reason than that HTTP POST just isn't good enough any longer.
@zacanger True, but I must actively choose to install those. Webshit developers assume that my simply navigating to a given URL constitutes I permission to run any code they choose to serve up.
@starbreaker yeah true! though it's not usually the webshit developers (i develop a webshit for a living!), it's the marketing people the webshit developers work with :\
@zacanger IMO, "Blame marketing" is the new "I was just following orders". Developers need to take a stand. We have the knowledge, and therefore the responsibility.
@lanodan i kind of agree, though i don't think there's anything wrong with using libraries/frameworks, because folks who actively avoid them seem to end up accidentally writing their own.
i do agree that the web can mostly be simpler, but at some point you're just trading client-side rendering for server-side rendering. for applications, all the complexity has to live somewhere. it's nice to say "i don't want my browser doing the work, your server should do the work" but that's not always easy
@lanodan yeah 100% agreed! some tools (webpack, rollup) help with the shipping-unused-code problem, but i worry that people will get used to that and forget how to keep their dependencies small and intentional
@zacanger it is my favorite. probably doesn’t hurt that it was my first. i relate anything new to the JS-based rosetta stone in my brain.
Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!