Why not allow empty code blocks?
Gregory Ewing
greg.ewing at canterbury.ac.nz
Tue Jul 26 03:21:14 EDT 2016
BartC wrote:
> (Yes everyone uses T*a (pointer to T) instead of T(*a)[] (pointer to
> array of T), because, thanks to how C mixes up deferencing and indexing,
> the former can be accessed as a[i] instead of (*a)[i].
>
> But it's wrong, and leads to errors that the language can't detect. Such
> as when a points to a single element not a block:
This is an implementation issue, not a language issue.
A sufficiently pedantic implementation could and would
detect this kind of error at run time. Most implementations
of C are not that pedantic, but you can't blame the
language for that.
--
Greg
More information about the Python-list
mailing list