Strings are a leaky abstraction for HTML
Hello dear subscriber,
I’ve not written to you for a while, partly because I don’t like Substack — both in general and specifically because the lack of syntax highlighting makes it a terrible platform for technical content — and partly because I’ve been too busy to figure out an alternative.
Yesterday, I started a blog using Astro and I’ve written a few posts you may want to read. I haven’t found a long-term solution for sending emails sans Substack, so for now I’m going to be posting round-ups from the blog here.
Strings are a leaky abstraction for HTML
First is a post in response to the constant feedback I get about Phlex being a leaky abstraction. I argue that Phlex is just an abstraction, in fact it’s an essentially airtight abstraction for HTML, that leaky abstractions are fine anyway as long as they’re useful, and that strings are the leakiest HTML abstraction of all.
LSP-driven API design
Next, I wrote about how Ruby LSP’s constraints have driven API design decisions and some accommodations you can make in Ruby libraries to better support it.
More typing with less typing, an introduction to Literal
Finally, I wrote an introduction to my Ruby gem Literal — a little about how it works, but mostly why it exists. There’s a fun story about a nightmare bug we encountered at Shopify that would have been prevented by even the most basic type checking.
I’m travelling to Wroclaw for wroc_love.rb tomorrow morning, so I look forward to meeting any of you who might be there.
All the best
Joel