[Chicago] Python/Mono slapdown [no pycon content]
Ian Bicking
ianb at colorstudy.com
Thu Mar 6 18:34:39 CET 2008
Martin Maney wrote:
> Mortadelo is a GUI tool that allows easy access to [some of] the
> capabilities of Linux's SystemTap - but that's not important.
> Mortadelo is written in C#, and one of the authors, who has some
> prior experience using Python, has taken the time to talk about what
> he likes and dislikes about both languages (and, inescapably, their
> libraries, low-level bindings, etc.)
>
> http://www.gnome.org/~federico/news-2007-06.html#18
>
> Having just been looking at SWIG and ctypes, I'm tempted to guess
> that he might not be familiar with the latter, but as I know
> literally nothing about how C# handles binding to extenal C code I
> could be mistaken.
I don't know what it looks like in C# either. ctypes is about as good
as you can get for calling, except that it doesn't read header files. I
believe Pyrex can read header files now? That adds to the build
Some other things he says:
> No lexical scoping.
Well this just isn't true. Nested scopes are writable. But Python
definitely as lexical scopes.
> Hard (impossible?) to make cons-free structures. For this particular
> program, this is a killer.
You have to use Numeric.
> "enum Foo { Bar, Baz, Beep }" is just much nicer than "(Bar, Baz,
> Beep) = range (oh-how-many-elements-again?)"
There's an enum library that handles this reasonably (the range thing is
indeed lame).
Ian
More information about the Chicago
mailing list