[Pyrex] A couple of questions about pyrex

Yingjie Lan lanyjie at yahoo.com
Thu May 14 01:08:42 CEST 2009


--- On Wed, 5/13/09, Franck Pommereau <pommereau at univ-paris12.fr> wrote:

> From: Franck Pommereau <pommereau at univ-paris12.fr>
> Subject: Re: [Pyrex] A couple of questions about pyrex
> To: lanyjie at yahoo.com
> Cc: "Robert Bradshaw" <robertwb at math.washington.edu>, pyrex at lists.copyleft.no
> Date: Wednesday, May 13, 2009, 8:51 AM
> > That's true, and cdef defines
> something invisible
> > to python except for the 'cdef class'
> 
> Yes, but that's a side effect. I think that enforcing the
> associating of
> cdef with visibility is misleading. If you want private
> classes, I think
> its better having a 'private' keyword, just like we already
> have 'public'.
> 

Everybody who participated in this thread: I appreciate all your responses, it is a good learning experience.

After reading the language specification, I somehow got a hunch that we need a good principle, otherwise, this language will soon become complicated and ugly, hard to use and understand. Take one example, you have 'def', 'cdef', 'cpdef'. IMHO, 'cpdef' can be knocked off -- whether use C style calling inside the module or not is really an issue the compiler can take care of -- and if you are starving for performance, you can give the compiler an option to call all 'def' functions/methods in C style inside the module whenever appropriate.

And I think Python is a very good example that we can follow.

yingjie


      



More information about the Pyrex mailing list