Python in Python does allow for a similar degree of introspection. Parameter types are not available (this is a change coming in Python 3 from what I am told) though, so it’s difficult to make a free-form interface, even internally.
In the 3rd to last paragraph, where I said “it’s like hese Python Developers have never worked on real projects”, I meant people who wrote documents I found or discussed things with me on IRC, AIM, or via e-mail, not the actual Python Developers (who were ahead of their time back when Python was first developed). In retrospect, this is an embarrassingly condescending attitude, but I feel it has some validity: There’s never an excuse for incomplete documentation, especially for longer-running, widely used technologies.
For an anecdotal demonstration, let’s compare two real-world scenarios:
First, I burned a bit over a week fighting with the python library to basically do sort of what I wanted. I couldn’t get introspection working from outside python space, and I couldn’t properly handle exceptions from outside python space either.
Second, on our weekly trip to the Yon Reptile Campaign (a 4 hour drive in a small VW Cabrio), smokris was able to, without internet access, make a functionally identical proof-of-concept application using Apple’s JavaVM bridge (which, as the article notes, is largely undocumented). With another hour in my hands, I was able to twist the runtime to tell us everything we needed to know except for parameter names: java class binaries don’t store this data, so it’s impossible to provide after compilation. A regrettable weakness, but also a sound demonstration of a technology that was designed to work in heterogeneous environments.
An epilogue:
Python in Python does allow for a similar degree of introspection. Parameter types are not available (this is a change coming in Python 3 from what I am told) though, so it’s difficult to make a free-form interface, even internally.
In the 3rd to last paragraph, where I said “it’s like hese Python Developers have never worked on real projects”, I meant people who wrote documents I found or discussed things with me on IRC, AIM, or via e-mail, not the actual Python Developers (who were ahead of their time back when Python was first developed). In retrospect, this is an embarrassingly condescending attitude, but I feel it has some validity: There’s never an excuse for incomplete documentation, especially for longer-running, widely used technologies.
For an anecdotal demonstration, let’s compare two real-world scenarios:
First, I burned a bit over a week fighting with the python library to basically do sort of what I wanted. I couldn’t get introspection working from outside python space, and I couldn’t properly handle exceptions from outside python space either.
Second, on our weekly trip to the Yon Reptile Campaign (a 4 hour drive in a small VW Cabrio), smokris was able to, without internet access, make a functionally identical proof-of-concept application using Apple’s JavaVM bridge (which, as the article notes, is largely undocumented). With another hour in my hands, I was able to twist the runtime to tell us everything we needed to know except for parameter names: java class binaries don’t store this data, so it’s impossible to provide after compilation. A regrettable weakness, but also a sound demonstration of a technology that was designed to work in heterogeneous environments.
Submitted by cwright on 2008.02.22 @ 14:56. |