Why not allow empty code blocks?

Random832 random832 at fastmail.com
Mon Jul 25 10:36:56 EDT 2016


On Sun, Jul 24, 2016, at 18:13, BartC wrote:
> (They don't need to be elaborate to start being confusing. Take 'int 
> *a[]' and 'int (*a)[]'; one of these is an array of pointers, the other 
> a pointer to an array. Quite different! But which is which?

int (*a)[]; === int x[]; where x is (*a). To work out the other one you
need to know operator precedence, but you need to know operator
precedence to understand a _lot_ of things.

C type _casts_ are slightly harder, since you have to work out where the
identifier belongs in a token sequence that has had it removed. But it's
usually not hard [look for the sequence "*)", which is otherwise illegal
and appears in most complicated type casts].



More information about the Python-list mailing list