On Tue, Jul 7, 2009 at 10:47 AM, Dag Sverre Seljebotn<[email protected]> wrote: > Lisandro Dalcin wrote: >> On Tue, Jul 7, 2009 at 7:36 AM, Robert >> Bradshaw<[email protected]> wrote: >>> On a more serious note, I'd probably prefer >>> >>> cdef extern from *: >>> ctypedef signed int? MyIntType1 >>> >> >> Many thanks for you input, Robert... I'll try to implement this... > > Sorry that I entered this late, but: > > What is the specific semantic differences for this type beyond what #333 > provides? > > That division (or other operations requiring a temporary) will be > disallowed? >
In the long term, we could special case things like division and do something smarter (upcasting?). We can start right now by disabling them, though I did not commented on this just because I'm not sure how to implement that... Until something smarter is implemented, users would require to put explicit casts in order to make arithmetic opts with such ctypedef types... > Or that #333-like behaviour will *only* be done if you use a "?"? If so, > for what gain? -- some fewer lines of C code? Why does it hurt to > "second-guess the user", as you put it in the OP? > Because of your fist question and my previous comment. Second-guessing will be a bad thing... BTW, this likely should affect you work on member descriptor, right? -- 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
