On Jun 19, 2009, at 6:41 PM, Greg Ewing wrote: > Robert Bradshaw wrote: > >> IIRC part of the motivation for int[:,:] syntax rather than >> special_name[int, ndim=2] was that the former is actually easier for >> humans to parse. Personally, it seems a natural extension of the int >> [50] syntax. > > I would be happier if it followed the C pattern more > closely by appearing on the right instead of the left > in a declaration, i.e. > > cdef int my_array[:,:]
This happens to be one of my pet peeves about C. Writing "int* a, b" to declare two variables of two types is, IMHO, just ugly (not to mention confusing to people who don't know C). We're stuck with it now, but I'd rather not propagate it. > As long as colons or ellipses are always used in this > form of declaration (am I right in thinking that's the > case?) then this is distinguishable from a plain array > declaration. Yes. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
