|
|
|
|
|
by jerf
3073 days ago
|
|
XS is the "same" hack all the time, though. A Perl library that can only be called in list context in Perl 6 is a substantial change from Perl 5. I've seen much smaller changes trash code bases before. I've got real code that would be affected by that. (I also think the context idea was a misfire in Perl <6, but as long as it is there, I've sometimes written code that had to deal with it.) That said, why is it impossible to call a Perl 5 function in scalar context? Shouldn't the equivalent of Perl 5's "scalar" be fairly easy to implement? It may stink to have to manually use it, but it wouldn't be very often, and it's easy enough to use any of half-a-dozen Perl 6 features to minimize the syntactic hit. |
|
Has Stefan (who wrote IP5) said or written that it's impossible?
18 months ago he wrote "So far I've found 3 different ways to implement scalar/list context for method/function calls".[1]
He has left issue #31 open.[2]
Where did you read that it's impossible?
[1] https://irclog.perlgeek.de/perl6/2016-08-03#i_12961486
[2] https://github.com/niner/Inline-Perl5/issues/31