Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Continuing my tweet about Express as another data point to iron/diesel per “Teaching libraries through good documentation”—
I’m not sure I can answer your question, since I somehow learned it a few years ago, basically by cobbling enough of an understanding on how the pieces fit together for the official API docs to make sense. But Express is a superstar so there are tons of online tutorials—all of them quite bad I found
Another example in this space is in Clojure, where a lot of people use the combination of ring (HTTP server) & compojure (routing). Dozens of plugins, like express—for anti-forgery, cookies, timeouts, JSON, &c.
Of course, for both Clojure and Node there are Rocket-like frameworks (Rails-like?), but they seem not as popular, in those ecosystems, as these hypermodular libraries. Definitely a head-scratcher for me…
Thanks for your reply! I think I first used express.js when 3.0 was just released, but I can't really remember how I got familiar with it. Probably some tutorial someone with half a week more experience than me wrote :)
I'm the kind of person who likes technologies that build huge ecosystems on a few, simple concepts, like middlewares. And I've always admired projects that feel like that, given a set of useful concepts, they are the "obvious" implementations. That's all very theoretical, though, and even though it is very nice to think about, breaks down in practice quite fast, and you have to look for many different smaller things to glue together. In the end, you know exactly what you have built, though, and also know how to extend it.
On the other hand, there are frameworks like Rails (or Rocket probably) that give you an opinionated collection of things that you will probably need. And when looking for something, you often find that the framework already contains it, and can maybe even guess the name. "Guessing names" is how I learnt to use Rails, basically.
I'm not saying I like one or the other better, so far these are just observations. I have some ideas why composing small modules is more popular in a language like Clojure compared to Ruby, but nothing definite. And I have not yet made up my mind about what will work better for Rust.
My favorite part of your essay is—
I’ve been working through some programming challenges (Cryptopals) in Haskell and Rust as a total beginner in both, and this describes my experience with Haskell (and other Powerful Languages) so well
Exactly! When I was writing this post, this—the immense usefulness of examples—is what really surprised me. I'm really looking forward to seeing how we can make it more common throughout the Rust ecosystem to litter docs with examples!
This is one of the reasons I write these things down, by the way: To get the thoughts I have on a topic in order, and actually think it through (up to a point). And I'm quite often surprised about what conclusion I arrive at. (I think I read it first in an essay by Paul Graham that good essays are texts where, while writing them, you don't know where they'll take you. Edit: It was this one.)
I'll update the post to link to this issue.