Formatted printing of Complex, Rat, etc. #13

pmichaud opened this Issue Jul 4, 2012 · 1 comment


None yet

2 participants

pmichaud commented Jul 4, 2012

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

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.


sorear commented Jul 5, 2012

After more reflection, I retract my earlier request to keep %m. %m feels to me like %u, insofar as it is fundamentally an aspect of the type not the formatting, so you should use .Complex if you want to force Complex formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment