Truth value of an empty slice

bearophile bearophileHUGS at lycos.com
Wed Jan 9 05:18:30 PST 2013


MrOrdinaire:

> Does it mean that the truth value of an empty slice depends on 
> the underlying array, not on the number of elements the slice 
> has, i.e. its length?

The short answer is that the safe and readable way to do that in 
D is to use std.array.empty.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list