Super-Fast Python Implementation for .NET and Mono 54
Lansdowne writes "Jim Hugunin, the creator of Jython, has released an incredibly fast implementation of Python for Microsoft .NET and Mono called IronPython. Here's his PyCON 2004 presentation, including some benchmarks. He concludes: 'Python is an extremely dynamic language and this offers compelling evidence that other dynamic languages should be able to run well on this platform.'"
cool stuff (Score:5, Interesting)
Re:cool stuff (Score:3, Interesting)
(There's a language I'd like to see on more platforms.)
Next Question (Score:3, Interesting)
Though this would probably break their binary compatibility with MS's implementation.
Re:stuck? (Score:3, Interesting)
What changed? (Score:5, Interesting)
Are we looking at some sort of fundamental breakthrough in working with the CLR here or was the problem simply tackled by a more experienced/insightful developer?
Platform (Score:3, Interesting)
Re:Dynamic? (Score:2, Interesting)
a = 1
Now a is an integer (actually what happens is this: an integer object is created, with the value 1, and the name a is bound to it)
a == '1'
Returns False: objects with different types can not be equal.
a = '1'
A new object is created, containing the string '1'. a now binds to that new object.
a == '1'
True.
Somewhat more useful: file objects implement a number of methods. If you write a class that implements those methods (often a subset is enough), you can use it any place where you can use a file object. No need to derive from file class. Of course this doesn't work only for files, it can be used for anything.
Re:Dynamic? (Score:4, Interesting)
In C, a "variable" is a box that contains things. The box is designed to only hold one kind of thing, so an "int" box can't hold a "char *".
In Python, a "variable" is just a "post-it note" that can be stuck onto a value. The post-it note "a" can be stuck on to anything: Nevertheless, Python is a strongly-typed language; this will raise an error: (If you're on a Unix system, you most likely have Python installed. Type "python" on the command line and try typing that in.)
Objects with different types are allowed to be equal, though there is some obvious danger with that. Here's a pathological case: This is bad, bad code in real life, but it proves the point.