From: "Alex Martelli" <aleax@aleax.it> > Introspection is good when you need to dispatch in a way that is > not supported by the language you're using. In Python (and most > other languages), this mostly mean multiple dispatch -- you don't > get it from the language, therefore, on the non-frequent occasions > when you NEED it, you have to kludge it up. Very similar to > multiple inheritance in languages that don't support THAT, really. > > (Particularly in how people who've never used multiple X don't > really understand that it buys you anything -- try interesting a > dyed-in-the-wool Smalltalker in multiple inheritance, or anybody > *but* a CLOS-head or Dylan-head in multiple dispatch...:-). Ahem. *I'm* interested in multiple-dispatch (never used CLOS or Dylan). You might not have noticed that I mentioned multimethods in my post about supporting overloading in Boost.Python. > Other aspects of introspection help you implement other primitives > lacking in the language. E.g. "make another like myself but not > initialized" can be self.__class__.__new__(self.__class__) -- not > the most elegant expression, but, hey, I've seen worse (such as > NOT being able to express it at all, in languages lacking the > needed ability to introspect:-). Is that really introspection? It doesn't seem to ask a question. > Looking at *ANOTHER* object this way isn't really INTROspection, > btw -- it's EXTRAspection, by the Latin roots of these words:-). Okay. I hope you won't be offended if I continue to use the wrong term so that everyone else can understand me ;-) -Dave
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4