On Using '$<n>' vs 'SAY' Constructs #15
Replies: 1 comment 3 replies
-
As far as I can remember,
I seem to recall that I thought about actually deprecating But this would be nice, right:
|
Beta Was this translation helpful? Give feedback.
-
@thoni56,
I noticed that the Library currently uses always the long
say [the|an] obj
form in the output strings:whereas it would be much less verbose to use the
$<n>
special parameter interpolations:I'm aware that using the
say <object>
from is safer because it allow compile-time checking, whereas the$<n>
notation is not checked at compile time; but is this really an issue? I mean, we'll be testing thoroughly all libraries via some test suite, so chances are that it's unlikely that such a gross error as parameters mismatching would occur in these places.Is the reason we don't see usage of the
$<n>
notation in Lib 0.6's code due to the fact that these parameter symbols were not available at the time (2007)?Or was it a deliberate choice not to use them?
Personally, I prefer using the
$<n>
notation whenever it's possible, for it doesn't break up strings and makes them more readable.Should we tweak the libraries code to use
$<n>
symbols instead ofsay
constructs, wherever it's possible? Or are there specific reasons why we'd rather stick to thesay
notation?This is also a topic worth mentioning the Contributors' Guidelines doc.
Beta Was this translation helpful? Give feedback.
All reactions