Implicit enum conversions are a stupid PITA

yigal chripun yigal100 at gmail.com
Fri Mar 26 03:52:42 PDT 2010


KennyTM~ Wrote:

> On Mar 26, 10 05:46, yigal chripun wrote:
> >
> > while it's true that '?' has one unicode value for it, it's not true for all sorts of diacritics and combine code-points. So your approach is to pass the responsibility for that to the end user which in 99.9999% will not handle this correctlly.
> >
> 
> Non-issue. Since when can a character literal store > 1 code-point?

character != code-point 

D chars are really as you say code-points and not always complete characters. 

here's a use case for you:
you want to write a fully unicode aware search engine. 
If you just try to match the given sequnce of code-points in the search term, you will miss valid matches since, for instance you do not take into account permutations of the order of combining marks.
you can't just assume that the code-point value identifies the character.



More information about the Digitalmars-d mailing list