good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There seems to be a lot of discussion of what it can do--in terms of "you can determine the type of something at runtime"--but little on why you would want or need to?
One of the nice things about being able to "determine the type of something at runtime" is that it enables one to change the "type" on the fly - which is precisely what perl does wrt numification of strings, where a "string" (PV) type is changed to IV, UV or NV as needed. Regarding perl, I've also found that being able to determine the "type of something at runtime" has ramifications for operator overloading. That is, operator overloading often benefits from being able to distinguish between object, PV, IV, UV and IV. (It may, in some cases, even *rely* on being able to make that distinction.) Whether these are *good* things is not something I want to argue about - though obviously there's plenty of support for this behaviour ... or it wouldn't exist to begin with. (I should also add that I'm not really familiar with "reflection" and "introspection". Apologies if I've missed the mark.) Cheers, Rob In reply to Re: Runtime introspection: What good is it?
by syphilis
|
|