Use of Attributes

This forum is meant for questions and discussions about the X# language and tools
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Use of Attributes

Post by FFF »

Frank,
to cite from your link:
..."You can work with a T:System.String object in its entirety instead of working with its individual characters to represent and analyze linguistic content."...

IMHO the "char" presents more problems than it's worth... It might have hold some usecase when talking only ASCII, plus severe memory restrictions - remember, when Apple II could keep a whole office app in 64kB ;) - but today?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Use of Attributes

Post by robert »

Frank,
Frank Maraite wrote:Hi all,
after reading this completly (but not fully understand the consequences)
https://msdn.microsoft.com/de-de/librar ... .110).aspx
it seem that 'Ä' and "Ä" (german umlaut, but other characters too) is not always the same.
"Ä" maybe one chars or two chars.
Frank, a little bit confused now.
Welcome in the Unicode nightmare. This has nothing to do with rational solutions but with language polictics...

The important thing is that the Unicode Standard identifies each Unicode character with a unique 21-bit scalar number called a code point. Char has only 16 bits, so is not sufficient to represent all Unicode chars. And Unicode keeps on adding characters, such as the emojis: http://www.unicode.org/emoji/charts/emoji-released.html

I have no idea why they have 2 representations of the same thing though.


Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply