in reply to •Re^3: Is $^M a leftover April Fool?
in thread Is $^M a leftover April Fool?

So, if this is such a good idea, why doesn't Perl reserve some small amount, like 8K or 16K, for exactly this purpose? It could even do so in $^M, to reuse the mechanism. And, if you don't want it to do that, then you can set $^M to 0. If you need more, up it. $^M x= 4 if you need 32K, etc.

Or, is there a reason this is a bad idea?

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^5: Is $^M a leftover April Fool?
by duff (Parson) on Jan 06, 2005 at 15:39 UTC

    I would imagine because it's often the case that a small amount isn't sufficient. Also, the amount of space needed is application dependent.

Re^5: Is $^M a leftover April Fool?
by Anonymous Monk on Jan 06, 2005 at 16:06 UTC
    Beside that 16K maybe not being enough, it's just a waste of resources. Most programs won't go out of memory, and if they do, dying while complaining about memory shortage is good enough. You really don't want to wast 16K (or whatever amount) for every process you are running.

    The default should be what is best for most programs. And most programs won't have any code dealing with "out of memory" situation. Therefore wasting a chunck of memory is just, well, waste.