float init 0 request

H. S. Teoh hsteoh at qfbox.info
Tue Aug 18 19:44:49 UTC 2026


On Tue, Aug 18, 2026 at 12:24:16PM -0700, Walter Bright via Digitalmars-d wrote:
[...]
> Designing a programming language is full of compromises. We just have
> to do the best we can.
> 
> Unlike C, which uses chars as integer types, D has a distinct char
> type. And so we can use the "invalid char value", or 0xFF, as its
> default initializer.

D might as well use integer types for char, because char, wchar, and
dchar implicitly convert to non-character int types.  This happens even
during overload selection: func(int) is preferred over func(dchar) when
selecting an overload that calls `func` with a wchar argument.

:-(


T

-- 
Some crows were looking eagerly at a piece of food in the middle of a busy street and wondering if they should go for it.  It's a tempted murder!


More information about the Digitalmars-d mailing list