in reply to Re^2: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?
in thread (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?
I've tried Perl6::Say, but found it wanting.
The list of caveats regarding the type of filehandles it will work with is annoying. I tend to store file handles in hash elements quite frequently, and use indirect object notation print { $fhs{INPUT} } $stuff;, and that doesn't work with P6::Say.
I'm not ready to give up the simplicity of that notation and move to $fhs{INPUT}->say .... If filehandles were truely OO constructs, complete with independant settings for $/, $\, $=, $., $^ etc. etc., then it would be a different matter...but they aren't.
If say were implemented within the language, it would be barely any code at all. Just a stub sub, pp_say, that localised $\ and set it to "\n", and then calls pp_print() would probably be all was required, but it would 'Just work'.
I think it would be a very useful addition to Perl5--but then I'm biased against having to add zillions of ."\n"s :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?
by TheDamian (Vicar) on Mar 09, 2005 at 20:42 UTC | |
by BrowserUk (Patriarch) on Mar 09, 2005 at 21:16 UTC | |
by Anonymous Monk on Mar 10, 2005 at 10:23 UTC |