I knew that we had a ‘less’ pragmas in Perl 5.8, but it was only yesterday something triggered me to really think about it.
The current version of document on this pragmas is really simple, and the feature itself is not implemented. It seems like there is not much chance for anyone to comment on it. However one thing I noticed is that, it is stated that this pragmas would be used by the compiler to determine certain trade offs base on the user’s wish, and the wording clearly indicates that their intention is that this pragmas would only be used by the compiler, not anyone else, at least base on their current mind set.
Now what I am thinking is that, instead of making it something solely belongs to the compiler, it would be much better if they can actually make it an open interface, so that anyone and everyone wish to contribute modules to Perl, would be able to retrieve those ‘less’ configurations set by users really easily, and adjust the behavior of their modules accordingly.
For example, if I am writing a module abc, and there was this method xyz, I can either make it using more memory to gain speed, or make it using less memory, if speed is not a concern. How do I know the user’s wish? Currently there is no way, but in the future, if the ‘less’ pragmas is open, which means I can retrieve the user settings thru a certain way, then I can go ahead use more memory for speed, if the user does not specify ‘use less memory’, or I should rather use less memory, if the user specifies ‘use less memory’.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.