[Cc'ing elsewhere for more feedback. Also top-posting for initial
impressions before the discussion.]
Here's some proposed function pointer syntaxes; which are the most
obvious to understand/read/remember? Can you figure them out?
cdef float (*F)(float)
cdef float (*G)(float (*)(float),
On Thursday, November 6, 2014 10:57:23 AM UTC-8, Robert Bradshaw wrote:
cdef float - float F
cdef (float - float, float, float) - float G
cdef (char*) - (float - float, float, float) - float H
Is there any precedent for an infix operator in type declarations? I find
it
Here's my 2 cents.
cdef float (*F)(float)
cdef float (*G)(float (*)(float), float, float)
cdef float ((*H)(char*))(float (*)(float), float, float)
I prefer this one because it mimics C function pointers (at least how I
remember, I'm somewhat rusty). When I saw the -, I
Hello !
To me the second looks the most clear. Except that I would have written
cdef (char*) - ((float - float, float, float) - float H) instead of
cdef (char*) - (float - float, float, float) - float H
But well, one gets used to things like that.
It is clearer but indeed is it surprising
Thanks for all the feedback!
On Thu, Nov 6, 2014 at 7:13 PM, Travis Scrimshaw tsc...@ucdavis.edu wrote:
Here's my 2 cents.
cdef float (*F)(float)
cdef float (*G)(float (*)(float), float, float)
cdef float ((*H)(char*))(float (*)(float), float, float)
I prefer this one