What features of D you would not miss?

Luhrel lucien.perregaux at gmail.com
Fri Sep 16 22:28:49 UTC 2022


On Friday, 16 September 2022 at 21:50:53 UTC, H. S. Teoh wrote:
> On Fri, Sep 16, 2022 at 09:24:40PM +0000, Luhrel via 
> Digitalmars-d wrote: [...]
>> I would also remove `wchar` and `dchar` (and 
>> [`d`/`w`]`string`), and go full Unicode for the `char` type, 
>> like in Rust.
>
> wchar/wstring is occasionally useful for interfacing with some 
> Windows APIs.
>
> `dchar` is needed for representing a full Unicode code point 
> (which can go up to 0x10_ffff). But `dstring` is pretty much 
> useless.
>
> [...]
>
> The problem is that what we think of as a "character" is *not* 
> what the Unicode standard calls a "character".
>
> [...]
> 
> they should treat strings as opaque binary data and only use 
> Unicode library functions to manipulate them.
>
> [...]
>
> Bad idea. In fact, we worked really hard to try to get rid of 
> this behaviour in Phobos, and I'm not sure if we're 100% there 
> yet.
>
> [...]
>
> This would imply extending autodecoding to every string 
> operation on UTF-8 data.  Autodecoding is something we've been 
> trying to get rid of, not keep, much less extend. :-P
>
>
> T

You're probably right. Some ideas are bad ideas ;)


More information about the Digitalmars-d mailing list