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

Fix Issue 21161 - [Variadic Templates] uses outdated example from D1 #2998

Merged
merged 2 commits into from
May 7, 2021

Conversation

maxhaton
Copy link
Member

@maxhaton maxhaton commented May 6, 2021

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @maxhaton!

Bugzilla references

Auto-close Bugzilla Severity Description
21161 enhancement [Variadic Templates] uses outdated example from D1 / Tango

@@ -132,16 +132,16 @@ $(H3 The D Look Ma No Templates Solution)
------
import core.vararg;
import core.stdc.stdio;
import std.format;

//For reference, this function signature is from D1.0
Copy link
Member

Choose a reason for hiding this comment

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

The point of this example is to show a template-less approach. Removing the FQN from doFormat makes sense but mentioning D1 is just confusing IMO. If you really want it mentioned, something like:
"While the standard library favors variadic templates over runtime type information, this approach can be taken whenever variadic templates are not practical, such as when passing a delegate is needed"

Copy link
Member Author

Choose a reason for hiding this comment

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

feedback incorporated, thoughts?

@maxhaton maxhaton force-pushed the tango_format_article branch from 82b1952 to 63128c6 Compare May 6, 2021 01:57
@maxhaton
Copy link
Member Author

maxhaton commented May 7, 2021

@mdparker

@Geod24 Geod24 merged commit 0de0936 into master May 7, 2021
@Geod24 Geod24 deleted the tango_format_article branch May 7, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants