3 ms·
One more reason why they shouldn’t be used for generics??
by mkchoi212 7y ago
One more reason why they shouldn’t be used for generics??
- AnimalMuppet 7y agoWhen I write code, whether I can easily make an HN headline out of the code is nowhere on my list of concerns.
- chrismorgan 7y agoBut when I write articles, how it will be handled by various platforms is on my list of concerns. So many platforms damage things with & < > ' " in them, stripping angle brackets and maybe their contents, and possibly entity-encoding all of those characters. (I find that curly quotes are harmed less often than straight quotes these days!) When I wrote https://chrismorgan.info/blog/rust-artwork-owl/ https://chrismorgan.info/blog/rust-artwork-owl/, which has the title “<_>::v::<_>”, I thought carefully about how it would be handled by feed readers, &c. Fortunately I had already been very careful in the site implementation (e.g. I support HTML in my titles and can strip it or have a different plaintext title, so angle brackets were definitely handled correctly) and had made the deliberate decision that my feed was Atom and uses <title type="html">, so feed readers should all get it right (though doubtless some will ignore the declared semantics and butcher it); if it had been an RSS feed (which doesn’t support declaring the type of a title), some feed readers would have stripped it to “::v::” (and been justified in so doing). Reddit handled it just fine, but maybe it’s just as well I didn’t submit it to HN!