Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Formatted printing of Complex, Rat, etc. #13

pmichaud opened this Issue · 1 comment

2 participants


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.



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
Something went wrong with that request. Please try again.