empty arrays and cast(bool): WAT
Jonathan M Davis
jmdavisProg at gmx.com
Sat Feb 18 19:56:25 PST 2012
On Sunday, February 19, 2012 04:52:48 Timon Gehr wrote:
> That is true. It is also what worries me. Having cast(bool) evaluate to
> false for empty arrays is intuitive and has massive precedent in other
> programming languages.
If we think that the problems solved by it are greater than those caused by
it, then the change should be made (and some of your examples make the current
behavior look pretty bizarre). But it's all wrapped up in the whole nonsense
of how null is handled with arrays, which is broken by design IMHO.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list