On Mon, Jan 30, 2012 at 8:05 AM, William Stein <wst...@gmail.com> wrote:
>
> On Jan 30, 2012 5:12 AM, "Nathann Cohen" <nathann.co...@gmail.com> wrote:
>>
>> Hello everybody !!!
>>
>> I wondered why we still had .py files in our library. Some time ago
>> this made sense as there were Python features that were not available
>> in Cython -- like the yield keyword -- but now that they are, what is
>> the point ? I'm asking this because we have in the Graph classes which
>> are "copies" of each other, that is for instance a file
>> generic_graph.py and a generic_graph_pyx.pyx, whose purpose is obvious
>> : we want to be able to define some methods as Python ones, some
>> others as Cython ones.

If classes or modules are artificially split due to (former, I hope)
limitations in Cython should be merged, but there's no reason to
switch from pure Python to Cython unless there's a compelling reason
to do so.

Cython compliments Python, it's not a replacement.

>> Well, what is the point of having .py files anymore when we could
>> easily rename them to .pyx without changing anything in them (first --
>> is that even true or am I a bit optimistic ?) and be able to add some
>> Cython code inside when Python is so awfully slow ?
>
> If you ever change a filebfrom Python to Cython for no clear good reason, I
> will be very annoyed.  One should always use Python instead of Cython unless
> there is a clear compelling reason not to.
>
> Cython code...
>
> - takes a long time to compile
> - is much harder to interactively debug sunce you can't run python code in
> the stackframe's context (yet)
> - requires more knowledge for devs to use thus reducing the maintainability
> of sage
> - is not always faster than pure python
> - does not support 100% of Python language features
> -
>
>> Cython is good, Cython is beautiful, Cython is fast. Thanks to Cython
>> I can finally write Sage code which fails on weird architectures and
>> spend days fixing the bugs, which is way harder with plain Python.
>>
>> Thankssss for your thoughts ! :-)
>>
>> Nathann
>>
>> --
>> To post to this group, send an email to sage-devel@googlegroups.com
>> To unsubscribe from this group, send an email to
>> sage-devel+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/sage-devel
>> URL: http://www.sagemath.org
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to