Hacker News new | ask | show | jobs
by layer8 79 days 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.

2 comments

Anecdotally 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.
I believe https://imgur.com/dN9Nz3h is the canonical example of why full Unicode support is maybe not desirable.
because 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))