4 ms·
It’s bad to disallow non-ASCII characters when programming for non-English business domains. The domain vocabulary often doesn’t translate well to English, or y
by layer8 7mo ago
It’s bad to disallow non-ASCII characters when programming for non-English business domains. The domain vocabulary often doesn’t translate well to English, or you need a glossary for someone familiar with the business domain to know which English term is supposed to mean which native business term. It’s just a pain. Conversely, transliterating the native term in ASCII can introduce ambiguities or be awkward or just plain weird for the native speaker.
Of course, Unicode can be abused, but ASCII isn’t completely free of that either. (Maybe it tickles your fancy to name a variable _o0O0o_ or l1lIl1lIl1lIl1l.) If your native script doesn’t have upper and lower case, compromises may have to be made. We have to trust programmers to use good judgement.
- fragmede 7mo agoI believe https://imgur.com/dN9Nz3h https://imgur.com/dN9Nz3h is the canonical example of why full Unicode support is maybe not desirable.
- throawayonthe 7mo agobecause ths is so much better: class pppp { func ppp(_ c: Int, m: Int) -> Int { return c + m } } var b = 3 var s = b + 2 var p = pppp() print(p.ppp(b, m: s))
- arcxi 7mo agoAnecdotally I'm programming for non-English business domains in Go and Python and I've literally never seen anyone use native alphabet in identifiers - it's always either poor translations or transliterations.