Skip to content

Conversation

jmdavis
Copy link
Member

@jmdavis jmdavis commented Feb 25, 2013

As it's now deprecated, nothing in Phobos (aside from std.metastrings itself) should be using it anymore.

@@ -2285,7 +2284,7 @@ unittest
auto p = toUTFz!P(s);
immutable len = zeroLen(p);
enforce(cmp(s, p[0 .. len]) == 0,
new AssertError(Format!("Unit test failed: %s %s", P.stringof, S.stringof),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have different semantics. You'll want to assign the result of the format call to an enum and then use that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it matter? Sure, the string will be generated at runtime instead of compile time, but why do we care? I don't know why it was using Format in the first place (though I'm pretty sure that I wrote this code, so that oddity is my fault).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I'm just saying, since it seemed weird to change something that was compile-time to run-time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll admit that I didn't catch the change in semantics, but looking at the code, I really don't think that it matters. If anything, it never should have used Format in the first place.

@quickfur
Copy link
Member

Just a remark, not intended to block this pull, that one good thing about std.metastrings is that it's pure, whereas std.format.format isn't. Just noting that this could be a problem if we need to deal with pure code.

@ghost
Copy link

ghost commented Feb 25, 2013

LGTM. This should be pulled ASAP to fix http://d.puremagic.com/issues/show_bug.cgi?id=9587

@quickfur
Copy link
Member

LGTM. Please pull ASAP, as my compiles are now flooded with deprecation messages from std.typecons.

alexrp added a commit that referenced this pull request Feb 26, 2013
Remove all uses of std.metastrings from Phobos
@alexrp alexrp merged commit 3e0c5ec into dlang:master Feb 26, 2013
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.

3 participants