Re: A couple of questions about pyrex
Yingjie Lan <[email protected]> Wed, 13 May 2009 16:08:42 -0700 (PDT)
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
--- On Wed, 5/13/09, Franck Pommereau <[email protected]> wrote: > From: Franck Pommereau <[email protected]> > Subject: Re: [Pyrex] A couple of questions about pyrex > To: [email protected] > Cc: "Robert Bradshaw" <[email protected]>, [email protected] > 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