Why UTF-8/16 character encodings?

Kagamin spam at here.lot
Thu Jun 27 03:03:14 PDT 2013


On Thursday, 30 May 2013 at 11:29:47 UTC, Manu wrote:
> Have you ever worked on code written by people who barely speak 
> English?

I did. It's better than having a mixture of languages like here: 
http://code.google.com/p/trileri/source/browse/trunk/tr/yazi.d
assert(length == dizgi.length); - in one expression!
@property Yazı küçüğü() const - property? const? küçüğü?

BTW I don't speak English myself, and D code doesn't comprise 
English either. How well do you have to know English to use one 
word to name a variable "player"? And I believe everyone who 
learned math know latin alphabet.

Unicode identifiers allow for typos, which can't be detected 
visually. For example greek and cyrillic alphabets have letters 
indistinguishable from ASCII so they can sneak into ASCII text 
and you won't see it. You can also have more fun with heuristic 
language switchers.

Try to find a problem in this code:
------
class c
{
	void Сlose(){}
}

int main()
{
	c obj=new c;
	obj.Close();
	return 0;
}
------

That's an actual issue I had with C# in industrial code. And I 
believe noone checked phobos for such errors.

I was taught BASIC at school and had no idea I should complain 
about latin alphabet even though I didn't learn English back then.


More information about the Digitalmars-d mailing list