On Fri, May 15, 2009 at 2:03 PM, Dag Sverre Seljebotn
<[email protected]> wrote:
> Lisandro wrote:
>
> I tried proposing something similar (unknown size) some time ago and it
> was voted down; perhaps the climate has changed now.
>

I voted it down perhaps because I misunderstood your proposal. I
understood you were proposing this for the whole type system.

If this is done for external ctypedefs, I would no oppose it.

>
> I support this anyway for more transparency about what Cython does (though
> none of those syntaxes), but I don't think it is really needed:
>

Well, I have a bit of fear of some user coding "cdef extern: ctypedef
signed long Something" and then Cython stop treating "Something" as
EXACTLY a "signed long". A user could complain: Hey, I know
"Something" is EXACTLY a "signed long", Why aren't you using such
declaration?

> This only affects situations where the type size is actually used for
> something. I can only think of constructing temporaries once this patch
> goes in.
>
> And how many situations can you think of which constructs temporaries of
> the type of the result of a binary operation?
>

What would happen below?

cdef MyInt a, b
....
cdef object o = a BINOP b



> The only one I can think of is Python-style division (which was only
> recently added, and where it is probably possible to rely on the compiler
> optimizing out a common expression for external typedefs instead of using
> a temporary -- must benchmark first though).
>
> So this isn't a big problem now, IMO.
>
> It WILL become a problem with type inference, but that's a bigger
> discussion we can have later.
>
> Dag Sverre
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to