in reply to Re: OO design: returning string and/or special value
in thread OO design: returning string and/or special value
True, hash/array assignment and other such things can trip sleepy programmers up. It's very unlikely to ever be called in this manner in my case, but certainly not out of the question. What I do wonder though, is whether that necessarily means "don't use wantarray," or if it's reasonable to trust an experienced Perl programmer to understand list and scalar context in a documented method, to avoid other potential bugs and reduce the average cognitive load of the programmer in question. What do you think?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: OO design: returning string and/or special value
by swl (Prior) on Oct 07, 2019 at 23:13 UTC |