Brilliant discussion of unicode and bytestrings: http://t.co/cOHhOVxdyb -- most languages get this wrong!
Related Posts
Today I learnt that Lua projects often use *3* spaces for indentation! https://github.com/luarocks/lua-style-guide/blob/master/README.md#indentation-and-formatting
I initially thought something was very wrong with editor config.
I've heard of 'blub languages', where you don't realise that other languages have better abstractions until you've experienced them.
I think the same thing happens with individual features. I've seen several C++ folks miss variadic generics in Rust, but I've not written enough C++ to feel it.
In LSP, a position is represented as a line number and a column offset (in Unicode code units): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
This is pretty elegant. You'll get the correct line regardless of encoding bugs, and the editor already knows the line number so it's cheap to compute.