2 ms·
Good grief man. I literally just grepped through my installed packages for '₁', looked for a relatively interesting line with lots of unicode, saw "haversine" a
by 3JPLW 7y ago
Good grief man. I literally just grepped through my installed packages for '₁', looked for a relatively interesting line with lots of unicode, saw "haversine" and realized it was a simple formula others would understand and that I would be able to find an image of online, and then hit google images looking for it.
The point isn't the algorithm itself. The point is just how using unicode allows you to match the style of an arbitrary algorithm out of a textbook.
- jacobolus 7y agoCopying random formulas out of a textbook is only a tiny part of writing programs, at least for me. Making this have slightly less friction just isn’t that big a practical improvement for me. YMMV. In general I see code or explanations relying on Greek letters as no better than ones with English words for names.
- ReidZB 7y agoFrom hours and hours of studying math, those symbols are imbued with implicit meaning - in a way, they are simultaneously a data type, a name, and often a purpose or context (e.g. delta-x). That's a lot of information for such a compact representation. And that's mostly unconscious, which is great. I really found the Julia example above to be far, far easier to understand than the linked JS (though I think that JS was not particularly great). To me, it seems like it'd be nice-to-have, but alone, I don't think it would be enough to make me switch languages.