Actually though, looking at your code fragment, I could ask why you
would write (in C):
if (1 == argc)
if (NULL == argv)
That would be a silly question. For values other than one (because
argv is pretty much guaranteed to have at least one element), you'd be
in danger of pointing right past the end of argv and into
uninitialized (or initialized but irrelevent) gibberish. The only
proper way to roll your own argc is to walk through argv until you hit
the NULL entry; you can't just jump there. It's this kind of boring
contortion that really makes me hate C for 98% of all programming
We can assume that the original poster is new to sensible languages
like Python and that it never occurred to him that argc is redundant.
In a language whose only truly first-class types are numerics and
pointers, having someone pass you the size of an array with the array
seems perfectly reasonable.