On Tue, May 3, 2011 at 10:06 AM, mark florisson
<markflorisso...@gmail.com> wrote:
> On 3 May 2011 18:00, Robert Bradshaw <rober...@math.washington.edu> wrote:
>> floating is implicitly available, we could require making it explicit.
>
> How would we make it explicit.

Require the parameterization, i.e.

    floating_p[floating]

would be the as-yet-unspecified type. In this particular example, it
does seem unnecessarily verbose. Without it, one would have to know
that

    cdef object foo(Vector v):
        ...

may depend on floating if Vector does.


On Tue, May 3, 2011 at 10:52 AM, Dag Sverre Seljebotn
<d.s.seljeb...@astro.uio.no> wrote:
> I was wrong. We need
>
> cdef f(floating x, floating_p y)
>
> ...to get 2 specializations, not 4. And the rest follows from there. So I'm
> with Robert's real stance :-)
>
> I don't think we want flexibility, we want simplicity over all. You can
> always use a templating language.

+1

> Btw we shouldn't count on pruning for the design of this, I think this will
> for a large part be used with def functions. And if you use a cdef function
> from another module through a pxd, you also need all versions.

Well, we'll want to avoid compiler warnings. E.g. floating might
include long double, but only float and double may be used. In pxd and
def functions, however, we will make all versions available.

- Robert
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to