05-09-2006, 01:33 PM
Alex Wrote:Is there any possibility this can be increased ?The leaner, the better. :!: :lol: Here's five reasons on how the way it is now helps us.
As-it-is Benefits:
- Easy solution: As you've discovered!: "There are many ways to make it shorter and more economical, I'm now making those adjustments, so it's not a big problem." However, "But it would be really convenient..." betrays a disordering laziness in relation to this next point:
- Good Coding Practice: It encourages us to modularize, clean up, & make code more manageable. So I actually LIKE the 32K limit!
I too got frustrated when one macro kept hitting 32K. But look at the results:- A tug: Made me repeatedly break up the long complex macro into more manageable & readable byte-sized chunks. hock:
- A hug: Made the code cleaner, more organized, easier to maintain! :wink:
- Be smug: Unique names given to functions are self-documenting; and use of functions reduces the size of their callers: It's easier to read through a main macro that calls color-coded self-explanatory functions, than to have to scan through a mountain of code to find out what the macro is doing.
- No shrug: Allows me to more easily understand the code years after I wrote it, and will allow others to understand the source code if and when it's released.
- A tug: Made me repeatedly break up the long complex macro into more manageable & readable byte-sized chunks. hock:
- Function reuse: Modular code can be more easily reused in other macros & functions, thus saving space & development time.
- Speed: General speed may suffer if the limit is increased: One of my CPU-intensive functions saw up to a 6% speed decrease in QM 2.1.8 (Alpha) vs 2.1.7 (details to be posted later as part of another post). Although such an intensive function is best converted to compiled C++ -- which QM is not meant to totally replace -- it nevertheless illustrates the point that having more might have affected speed, so having more may not be the best thing if we can do well without.
- Other needs: If we can do well without the feature, it would leave more time for Gintaras to build other more essential features.
Tips:
If you think your code can't be broken up, think again, use your brain. It usually, if not always, can. A web page has links instead of burdening you with a mountain of info at once; so too must complex macros have functions. A home has doors to various rooms; your macros can have doors to functions each designed for a specific task.
QM is a monolithic macro program & development environment: a coder's dream come true. Its 32K macro-size limit perhaps makes the program lean, mean, and not bloated like other software becomes. It's served me well in thousands of hours of programming since QM v1.3.3's debut in 2001 (yet I only know perhaps a tenth of its power...!).
Having trouble breaking up your code even after wracking your brain? Just post or send me a message. I could possibly help.