On Wednesday, 18 November 2015 at 20:57:08 UTC, Spacen Jasset
wrote:
Should this be allowed ?
IMHO no.
It's better to use `.length` to test if an array is empty. Why ?
Because the day you'll have a function whose parameter is a
pointer to an array, comparing to null will become completly
confusing:
---
void whyPeopleShouldUseLength(char[]* buffptr)
{
if (buffptr != null && buffptr.length > 0) {}
}
---
Here you really have to test if the variable is assigned, it's
not a shortcut to test the internal buffptr `.ptr` member.