Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Formatted printing of Complex, Rat, etc. #13
Following the "forgiveness > permission" principle, I just removed the sprintf 'm' modifier (for formating Complex numbers) from S32-Str.pod, because it seems too irregular with respect to other sprintf-formatting codes. For example, there's disagreement about the type of modifier that should be used for formatting Rats (see http://irclog.perlgeek.de/perl6/2012-07-04#i_5784979).
In a larger sense, the format codes in 'sprintf' strike me as wanting a significant redesign for Perl 6, analogous to how Perl 6 has redesigned regex syntax. Simply layering new (somewhat ad-hoc) conversion specifiers onto the existing sprintf codes feels like the wrong approach; we should come up with a more regularized (and therefore teachable) syntax.
I do feel it makes sense to keep 'sprintf' around for now, albeit with its more traditional conversion specifications. If we do end up adding new modifiers, let's at least mark them "conjectural" until we have sufficient use cases and implementations to be comfortable that they should remain.