| ▲ | nine_k 5 hours ago | ||||||||||||||||||||||||||||||||||||||||
The rule must be very simple: any occurrence of `eval()` should be a BIG RED FLAG. It should be handled like a live bomb, which it is. Then, any appearance of unprintable characters should also be flagged. There are rather few legitimate uses of some zero-width characters, like ZWJ in emoji composition. Ideally all such characters should be inserted as \xNNNN escape sequences, and not literal characters. Simple lint rules would suffice for that, with zero AI involvement. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | WalterBright 4 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
> There are rather few legitimate uses of some zero-width characters, like ZWJ in emoji composition. Emojis are another abomination that should be removed from Unicode. If you want pictures, use a gif. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| ▲ | hamburglar 4 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
I think there’s debate (which I don’t want to participate in) over whether or not invisible characters have their uses in Unicode. But I hope we can all agree that invisible characters have no business in code, and banishing them is reasonable. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | trollbridge 5 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
In our repos, we have some basic stuff like ruff that runs, and that includes a hard error on any Unicode characters. We mostly did this after some un-fun times when byte order marks somehow ended up in a file and it made something fail. I have considered allowing a short list that does not include emojis, joining characters, and so on - basically just currency symbols, accent marks, and everything else you'd find in CP-1521 but never got around to it. | |||||||||||||||||||||||||||||||||||||||||