Robert Bradshaw wrote:
If you want a hint, the last is something that returns numerical
integration algorithm given a string name. Yes, you could use
typedefs, but you shouldn't have to.

I don't find *any* of those particularly easy to read in the third
case, or even the second. Using typedefs to make the intention
clear, even if the syntax doesn't require it, seems entirely
appropriate to me.

I am curious, when you read "cdef int * p" do you parse this as "cdef
(int*) p" or "cdef int (*p)"

C syntax is sufficiently well embedded in my brain that I
parse it as "int (*p)", and read it as "p points to an int"
or "p is of type pointer-to-int".

But I don't find myself needing to parse "int * p" very often,
because I always write it as "int *p", and so do most other
people who write C. Whenever I see something like "int * p"
or "int* p", it makes me think it was written by someone who
doesn't understand C very well.

--
Greg
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to