in reply to Re: A caller() by any other name
in thread A caller() by any other name

TFT xdg,

Using defined offsets into arrays/lists, to my mind, has little to offer over the normal positional arg passing - if nothing else, AFAICT, PBP recommends avoidance of such measures. Personally, however, I prefer named args for long arg lists (as does PBP;-).

But thanx anyway for the reference - POE provided some interesting reading...

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^3: A caller() by any other name
by xdg (Monsignor) on Dec 03, 2008 at 02:14 UTC
    Using defined offsets into arrays/lists, to my mind, has little to offer over the normal positional arg passing

    As I understand the idea in POE, one reason for it is forward compatibility. You can rearrange the order of positional arguments -- e.g. insert new ones between fixed arguments and a variable list of arguments at the end -- and since the constants are redefined at the same time, code using the defined offsets still just works.

    IMO, PBP should be taken with (several) grains of salt. It's only one opinion about best practices and even the author says it's not an exclusive list of best practices. And there are some stunningly bad recommendations in there, too.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.