Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrections, improvements, notes modified or added, unimplemented fea… #870

Merged
merged 2 commits into from Aug 31, 2016
Merged

corrections, improvements, notes modified or added, unimplemented fea… #870

merged 2 commits into from Aug 31, 2016

Conversation

tbrowder
Copy link
Member

…tures marked NYI (after testing on late model rakudo)

@jonathanstowe
Copy link
Contributor

In order to not lose the corrections I'll go with merge but I'm wondering if the NYI parts should actually just be removed or commented out or something

@jonathanstowe jonathanstowe merged commit cf22b09 into Raku:master Aug 31, 2016
@tbrowder
Copy link
Member Author

Altai man seemed to want NYI, and I agree. Maybe there is a better way to do it, though. I guess it wouldn't hurt to look at the appropriate spec and maybe get jnthn or moritz to take a look.

@tbrowder tbrowder deleted the sprintf-update branch August 31, 2016 11:58
@Altai-man
Copy link
Member

Indeed, this PR really has corrections and clarifications, so it's good for me. But I'm not the main maintainer(not even the most productive contributor) here, so it's just my opinion.

About the spec, https://design.perl6.org/S32/Str.html#sprintf says "mostly identical to the C library sprintf function" and describes some parts of it. The grammar there(and https://github.com/perl6/nqp/blob/b403469d0759a3264e847c926e5bc7e6ca732c45/src/HLL/sprintf.nqp) can give us thought that modifiers weren't planned. Although, they are described here.
We have an exception for unsupported directives, but %ll throws unknown sequence instead of it.

To be sure, we need a clarification about "how exactly is it mostly identical". If modifiers would be implemented after all, it is good as it now. If they wouldn't be implemented, we need to just remove this part of the description.

@tbrowder
Copy link
Member Author

I agree whole-heartedly. Much of the C sprintf (and friends) modifiers are required because of strict typing and catching errors. Perl 6 shouldn't really need such.

And the '$' arg selections are, IMHO, not useful at all. In my over 30 years of C/C++ experience I haver never used it and I don't ever remember seeing them used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants