On 2022-03-04 00:38:22 +0000, Avi Gross via Python-list wrote: > I have seen major struggles to get other character sets into > languages. Any new language typically should have this built in from > scratch and should consider adding non-ASCII characters into the mix. > Mathematicians often use lots of weird braces/brackets as an example > while normal programs are limited to [{( and maybe < and their > counterparts. This leads to odd Python behavior (other languages too) > where symbols are re-used ad nauseam. { can mean set or dictionary or > simply some other way to group code.
I think the main reason for this is that people have to be able to type the code. I do remember the days when German keyboards didn't have brackets and braces and you had to type alt-123 to get a {. Made it real fun to program in C ... If you design a language and in IDE together (the way Smalltalk was designed back in the 1970s or maybe Visual Basic) you can use all sorts of funky characters because you can also provide a standard way to enter them. But if you expect your users to type programs in a standard text editor (even a fancy one like Emacs or Vim or VS Code), you have to restrict yourself to a character set that most people can comfortably type on their keyboards with the key mapping provided by their OS. Which for historical reasons means US-ASCII. hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | h...@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list