in reply to Re7: The costs of packages
in thread The costs of packages

Hmm.

Each module consists of only the constructor. Everything else is handled by the superclass.

If I can have one module that consists of (currently, though it's not finished) around 100 lines of executable code, and one line of data for each of the several hundred types involved, versus one superclass of 100 hundred lines and an 8 line module for each of the several hundred types, I prefer the former to the latter.

Further more, the data lines are extracted from header files using another script. The header files are subject to changes. These are infrequent, but I'd rather just re-generate the DATA section of one module when required than fuss with maintaining several hundred, small and essentially identical modules.

I did look at several possible candidates for doing this before I started including Class:Struct , Inline::Struct, C::Dynalib::Struct and Win32::API::Struct, but felt that none of them met my requirements for

Basically I thought I could do better, and I do not have the commercial pressures upon me to do it in any give time frame, so I am going ahead with my design. Whether the result will meet my own requiements will take a few more days to verify.

Whether others will consider my efforts worthwhile I won't know unless I publish the code...which I may do if I am satisfied with the result.

I really tried to avoid this whole discussion by asking a very specific question. It's difficult to argue the merits for or against what I'm doing without getting into a full blown description of the entire project, which I'm not in a position to do right now.

When the project is completed, I might work up a comparison between my solution and one or two of the other possibilities suggested and throw it out for discussion. It might be interesting thing to do if anyone else would be interested.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.