On 12.07.22 22:14, H. S. Teoh wrote:
Pedantically, no, they're not the same. You can assign null to a
pointer, but you can't assign [] to a pointer. `null` is a supertype of
`[]`.

But probably nobody actually cares about this distinction. :-D

If we're ignoring context, "null" has four characters, while "[]" has only two. Clearly, they're not similar at all.

The context was arrays, not pointers. `void f(T[] a = null) {}` has exactly the same meaning as `void f(T[] a = []) {}`.

Reply via email to