5 ms·
> you shouldn't need non-ASCII idents anyway Yes, we do. People from all over the world write software too. They should be able to use the words they know in c
by matheusmoreira 5y ago
> you shouldn't need non-ASCII idents anyway
Yes, we do. People from all over the world write software too. They should be able to use the words they know in code.
Also, it's totally cool to have mathematical symbols in code. λ, for example. Much more readable than the word lambda. The only reason these symbols are hard to type is our keyboards suck. They can be made easy to type with editor support though.
- jimmaswell 5y agoASCII is the standard for code for good reason. Everyone can type it. Put whatever you want in comments, but you shouldn't make people have to copy/paste your variable names.
- matheusmoreira 5y ago> you shouldn't make people have to copy/paste your variable names The people working on a non-english codebase don't have to. Their keyboards have the symbols they're typing.
- jimmaswell 5y agoYou're assuming no international collaboration.
- antris 5y ago>Yes, we do. People from all over the world write software too. They should be able to use the words they know in code My native language has non-ASCII characters and I do not expect nor do I want to be able to type them outside string literals. Specifically for the reasons stated in the blog post, among others. Writing in my native language is far, far down in the list of priorities as a professional coder, when security / compatibility are there too. Suggesting that non-native English speakers have to be able to code in their native language also would suggest that non-native coders do not take security / compatibility seriously, which would mean that they are unprofessional. I'm pretty sure that it's not your intention to suggest that, but that's kind of how it comes across. With all the problems eliminated by the use of English and ASCII, it would strike me as amateurish to not use English and ASCII wherever possible.
- matheusmoreira 5y ago> non-native coders do not take security / compatibility seriously That's not what I said at all. I don't see how you came to this conclusion. > With all the problems eliminated by the use of English and ASCII, it would strike me as amateurish to not use English and ASCII wherever possible. Not everybody speaks english. I've taught programming to quite a few people and they all attempted to use normal characters while writing code. There's absolutely no reason why that shouldn't work. I don't see how characters like ç or ã or ü could possibly cause security issues. Go ahead and ban the invisible unicode stuff but there's absolutely no reason why these common letters shouldn't work.
- antris 5y agoIt is funny that you are using the existence of a segment of the population that I am a part of, to make your claim but aren't willing to listen when a member of the segment is trying to explain how non-ASCII characters and coding do not mix well. Sure, you could make a fix for this specific case, but the problem mentioned in the blog post is not even close to the only problem of non-ASCII characters. In theory, yes, we could make a language and a full suite of tooling that would play nice with non-ASCII characters. But it's not like the whole non English speaking world is waiting for this to happen. People code in English even in teams where everyone speaks Finnish. Nobody even questions it, because it's so obvious that all code should be in English and ASCII. Everyone has shot their foot, putting in non-ASCII characters in the source code at some point of their career, if they have ever dared to try. That's how the reality is, and at the same time I hear people saying that the existence of those Finnish programmers means we have to have Unicode in source code. >That's not what I said at all. I don't see how you came to this conclusion. I didn't say you said it. I said that's how it (probably accidentally) comes across when you talk about something so carelessly. Non English speakers care about compatibility and security and take those seriously, therefore we pretty much always write code in English and ASCII.
- matheusmoreira 5y ago> It is funny that you are using the existence of a segment of the population that I am a part of, to make your claim but aren't willing to listen when a member of the segment is trying to explain how non-ASCII characters and coding do not mix well. Why is it funny? I'm also a member of that group. English is not my native language. > But it's not like the whole non English speaking world is waiting for this to happen. I don't think we should have to wait for this to happen. In many ways, it's already happened: most modern languages already support unicode symbols. > People code in English even in teams where everyone speaks Finnish. Nobody even questions it, because it's so obvious that all code should be in English and ASCII. Relatively few people speak english in my country. I have only a few friends who do. A whole team of people writing code in english just doesn't seem likely where I live. I actually tried writing english code in such a context once, the result was a mixed language mess that I quickly reverted back to my native language. Unicode support is great because it makes the non-english code much more readable. Europeans in general seem to know english very well. This is not the case everywhere. Somehow making english a requirement for programming just doesn't sound fair to me.
- tytso 5y agoGood code is maintainable code. And while you, as the original programmer, might be perfectly comfortable writing your code using Arabic variables and comments, what if the next person who has to maintain the code is from Korea? Or Russia? Or France? Or China? OK, maybe you're a small startup in Taiwan and so you don't care about the next maintainer in your company not being able to read or write Chinese. What if you decide to open source your code? Or Meta decides to offer you a zillion dollars to buy you out, but after they do their due diligence, realize that the code is utterly unmaintainable should they decide to outsource internationalizing the code so it will work in Brazil, so that requires native Portguese speakers (who can preferably be paid low, low wages) --- but they can't understand the code because it's using Chinese variables and comments. And then Meta decides to back out from the deal?
- matheusmoreira 5y agoIf you're likely to work with an international team, it makes sense to use english. That's not always the case though. Plenty of those low-paid brazilian programmers you cited will never do that. Many of them don't speak english to begin with. For example, the school I went to had a simple web application for student feedback. Attachments were allowed. People started running into issues due to non-ASCII characters in file names. I reported the issue to the IT department and even helped them fix it. The Python code was written in portuguese, accents and everything. Why shouldn't accents be used in this case? It's unlikely this code will ever be used in an international context.