[pypy-dev] pypy-dev Digest, Vol 13, Issue 21

Armin Rigo arigo at tunes.org
Wed May 16 08:28:25 CEST 2012


Hi Jean-Paul,

On Tue, May 15, 2012 at 9:22 PM,  <exarkun at twistedmatrix.com> wrote:
> I don't think it's true that using strings instead of types (or other rich
> objects) simplifies anything.  Quite the opposite, it takes all of the
> complexity which must exist and throws a huge wall up to prevent anyone from
> understanding it without undertaking a huge amount of extra work.

While I generally agree with this, I have doubts about this particular
case.  It seems to me that building normal Python objects to represent
C types has mostly the effect of multiplying verbosity in the source
by a factor of 3, and requiring the programmer to learn details about
the new classes; and with very little gains because C types are, by
definition, supposed to be used only in declarations and rarely in
actual code (apart from C casts).  I fear that down this path lies
precisely ctypes.


A bientôt,

Armin.


More information about the pypy-dev mailing list