5 ms·
examples of such features being?
by hard_times 1y ago
examples of such features being?
- exe34 1y agoascii vs utf
- n4r9 1y agoSeveral are given in the linked article, like built-in support for ~non-Roman~[edit: non-Western] numeral characters, and nomenclature that works well with screen readers. A diverse staff may also help to promote language (e.g. keywords or in documentation) that's broadly understood across different cultures.
- AStonesThrow 1y agoBut why for (I = I; I <= XIV; I++) { printf("Pope Leo %d is best Pope Leo!\n", I); } Interestingly, the authors use circumlocutions to avoid naming the Arabic numerals for what they are, while the ones used in their example are known as Eastern Arabic Numerals. https://en.wikipedia.org/wiki/Arabic_numerals_(disambiguation) https://en.wikipedia.org/wiki/Arabic_numerals_(disambiguatio...
- n4r9 1y agoHah, thanks for the correction.
- whatevertrevor 1y agoThey clarified in the footnote that this is to prevent confusion as many readers may not know that Arabic numerals are the widely used ones. It is indeed confusing that what the world uses as numerical lingua-franca are Arabic numerals, and what are used in Arabic script (and India sometimes) are called Eastern Arabic Numerals.
- moi2388 1y agoYou mean all the examples which do exist in all major programming languages, completely invalidating their entire point? Gotcha.
- n4r9 1y agoHow do you mean? I just tried typing var x = ٢ + ٢; into a C# project in Visual Studio and got a bunch of errors like Unexpected character '٢'
- moi2388 1y agoYou really don’t see the irony when you’re posting this on a website and it renders just fine?
- n4r9 1y agoAh, I think I see the confusion. In the linked article it talks about whether the code itself can include non-western digits. That's distinct from whether it can handle strings or render text containing non-western digits.
- moi2388 1y agohttps://en.m.wikipedia.org/wiki/Non-English-based_programming_languages https://en.m.wikipedia.org/wiki/Non-English-based_programmin...
- n4r9 1y agoIt's great that those languages exist. But that doesn't refute that mainstream PL design is linguistically narrow. Even the languages in that article are mostly monolingual, whereas the author is envisioning multilingual languages.