I'd say that if you code general solutions, and that's what the OP was doing, you should consider such possibilities. Programs that run in a specific, or controlled environment may not have to take such things into consideration.
Oh, and don't get the idea that a package of '0' has never happened. The original post triggered a memory. Years ago, a co-worker was working on some complicated template system. Some code also dealt with 'ref' and blessed objects. And code *did* fail because some other code (which generated code) blessed objects in the package '0'.
OTOH, I've never encountered a supposedly text file that ended with "\n0". That doesn't mean I won't check for definedness when necessary.
Secondly, shouldn't bless [], 0; be considered a bug and reported for fixing?
Uhm, why? Just because it's inconvenient? Then we might as well forbid filenames to contain spaces and Microsoft Outlook - that's inconvenient as well. ;-)
Abigail
In reply to Re: Recursive map Design Questions
by Abigail-II
in thread Recursive map Design Questions
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |