<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: Named Arguments in C++	</title>
	<atom:link href="https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Thu, 20 Dec 2018 11:55:43 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Adversus		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1536</link>

		<dc:creator><![CDATA[Adversus]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 19:59:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1536</guid>

					<description><![CDATA[Good read! Note that there are some stray `NamedTypeImpl` that should probably be `NamedType`.]]></description>
			<content:encoded><![CDATA[<p>Good read! Note that there are some stray `NamedTypeImpl` that should probably be `NamedType`.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matthew von Arx		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1535</link>

		<dc:creator><![CDATA[Matthew von Arx]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 19:13:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1535</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1528&quot;&gt;Lesley Lai&lt;/a&gt;.

I saw &lt;a href=&quot;https://www.youtube.com/watch?v=Grveezn0zhU&quot; rel=&quot;nofollow&quot;&gt;Richards talk&lt;/a&gt; as well, but I appreciate the different approach shown here.  It is more dependent on the core language and the standard library while Richard&#039;s was using Boost::Hana to accomplish his hack.  I&#039;m not specifically judging which I think is better, just wanted to provide context to your comment on Richard&#039;s approach.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1528">Lesley Lai</a>.</p>
<p>I saw <a href="https://www.youtube.com/watch?v=Grveezn0zhU" rel="nofollow">Richards talk</a> as well, but I appreciate the different approach shown here.  It is more dependent on the core language and the standard library while Richard&#8217;s was using Boost::Hana to accomplish his hack.  I&#8217;m not specifically judging which I think is better, just wanted to provide context to your comment on Richard&#8217;s approach.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alf P. Steinbach		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1534</link>

		<dc:creator><![CDATA[Alf P. Steinbach]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 16:14:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1534</guid>

					<description><![CDATA[Strong coincidence, a few weeks ago I was thinking of writing an article like this for a Norwegian magazine. The same idea of representing arguments via strong typing, from the Boost Parameter library, except that I defined an argument pack type with custom features, instead of relying on `std::tuple`. I think you should at least have mentioned the Boost Parameters library, because even though today it&#039;s unusable C++03 stuff (I think, due to the silly and fragile macro based domain specific language that it defines, it was unusable also in the C++03 days: I never heard of anyone using it), it introduced the main ideas.

I dropped the article after I realized that there was no good way of making the argument types for a function `f` available unqualified in a context where more than one such function could be used.

I toyed with the idea of a macro for invocation, with that macro using a lambda and either `using namespace;` or an ADL argument. But when I tried out I found that it was just too awkward. What&#039;s needed appears to be a language feature opposite of ADL, a Function Dependent Lookup of argument types, FDL.]]></description>
			<content:encoded><![CDATA[<p>Strong coincidence, a few weeks ago I was thinking of writing an article like this for a Norwegian magazine. The same idea of representing arguments via strong typing, from the Boost Parameter library, except that I defined an argument pack type with custom features, instead of relying on `std::tuple`. I think you should at least have mentioned the Boost Parameters library, because even though today it&#8217;s unusable C++03 stuff (I think, due to the silly and fragile macro based domain specific language that it defines, it was unusable also in the C++03 days: I never heard of anyone using it), it introduced the main ideas.</p>
<p>I dropped the article after I realized that there was no good way of making the argument types for a function `f` available unqualified in a context where more than one such function could be used.</p>
<p>I toyed with the idea of a macro for invocation, with that macro using a lambda and either `using namespace;` or an ADL argument. But when I tried out I found that it was just too awkward. What&#8217;s needed appears to be a language feature opposite of ADL, a Function Dependent Lookup of argument types, FDL.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jft		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1533</link>

		<dc:creator><![CDATA[jft]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 14:07:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1533</guid>

					<description><![CDATA[As was pointed out in a comment to this post https://www.fluentcpp.com/2018/11/30/function-parameters-3/
there is already the Boost Parameter Library. See https://www.boost.org/doc/libs/1_68_0/libs/parameter/doc/html/index.html

As I mentioned in that post, IMO to do this &#039;properly&#039; requires compiler support as the &#039;named argument&#039; should be specified separately to the parameter variable. Something like:

&lt;pre&gt;&lt;code&gt;
void func1(.param1 int a, .param2 int b)
{
   ....
}

func1(.param2 = 3, .param1 = 4);
&lt;/code&gt;&lt;/pre&gt;


This type of argument passing has been previously considered and rejected by the c++ standards committee - so I don&#039;t know....]]></description>
			<content:encoded><![CDATA[<p>As was pointed out in a comment to this post <a href="https://www.fluentcpp.com/2018/11/30/function-parameters-3/" rel="ugc">https://www.fluentcpp.com/2018/11/30/function-parameters-3/</a><br />
there is already the Boost Parameter Library. See <a href="https://www.boost.org/doc/libs/1_68_0/libs/parameter/doc/html/index.html" rel="nofollow ugc">https://www.boost.org/doc/libs/1_68_0/libs/parameter/doc/html/index.html</a></p>
<p>As I mentioned in that post, IMO to do this &#8216;properly&#8217; requires compiler support as the &#8216;named argument&#8217; should be specified separately to the parameter variable. Something like:</p>
<pre><code>
void func1(.param1 int a, .param2 int b)
{
   ....
}

func1(.param2 = 3, .param1 = 4);
</code></pre>
<p>This type of argument passing has been previously considered and rejected by the c++ standards committee &#8211; so I don&#8217;t know&#8230;.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Benoît Thouy		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1532</link>

		<dc:creator><![CDATA[Benoît Thouy]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 09:54:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1532</guid>

					<description><![CDATA[Loss of clarity, for sure, the prototype is completely obscure. Plus plenty of static objects through the code.
IMO, named arguments are useful when you need to deal with optional arguments. With mandatory arguments, you must assign a value to each of them, and code hint system helps a lot to see what is the current argument to set. If we take care about logical ordering in prototyping functions, I think named arguments is just sugar.
For optional arguments (with default values), ordered list seems like a pain, enforcing the coder to recall default values and so on. In that case it sounds better to pass default arguments as a single object, in which we could use named arguments to ease construction, enforce default values and so on. Seems to be an application case of this post ... ? :)]]></description>
			<content:encoded><![CDATA[<p>Loss of clarity, for sure, the prototype is completely obscure. Plus plenty of static objects through the code.<br />
IMO, named arguments are useful when you need to deal with optional arguments. With mandatory arguments, you must assign a value to each of them, and code hint system helps a lot to see what is the current argument to set. If we take care about logical ordering in prototyping functions, I think named arguments is just sugar.<br />
For optional arguments (with default values), ordered list seems like a pain, enforcing the coder to recall default values and so on. In that case it sounds better to pass default arguments as a single object, in which we could use named arguments to ease construction, enforce default values and so on. Seems to be an application case of this post &#8230; ? 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Björn Fahller		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1531</link>

		<dc:creator><![CDATA[Björn Fahller]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 09:38:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1531</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1530&quot;&gt;Björn Fahller&lt;/a&gt;.

I partially take that back. You can, and it&#039;s almost reasonable. Sketchy outline here:

https://gcc.godbolt.org/z/jV58Pp]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1530">Björn Fahller</a>.</p>
<p>I partially take that back. You can, and it&#8217;s almost reasonable. Sketchy outline here:</p>
<p><a href="https://gcc.godbolt.org/z/jV58Pp" rel="nofollow ugc">https://gcc.godbolt.org/z/jV58Pp</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Björn Fahller		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1530</link>

		<dc:creator><![CDATA[Björn Fahller]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 08:15:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1530</guid>

					<description><![CDATA[Two (related) drawbacks (apart from the function signature not really saying what it expects.) There&#039;s no reasonable way of ensuring that all necessary parameters are passed, and there&#039;s no reasonable prevention against passing the same parameter several times.]]></description>
			<content:encoded><![CDATA[<p>Two (related) drawbacks (apart from the function signature not really saying what it expects.) There&#8217;s no reasonable way of ensuring that all necessary parameters are passed, and there&#8217;s no reasonable prevention against passing the same parameter several times.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lesley Lai		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1528</link>

		<dc:creator><![CDATA[Lesley Lai]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 04:40:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1528</guid>

					<description><![CDATA[I prefer this one then Richard&#039;s metaprogramming hack he showed in cppcon.]]></description>
			<content:encoded><![CDATA[<p>I prefer this one then Richard&#8217;s metaprogramming hack he showed in cppcon.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: pyxis		</title>
		<link>https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/#comment-1527</link>

		<dc:creator><![CDATA[pyxis]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 03:40:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3033#comment-1527</guid>

					<description><![CDATA[This is just as much of a horrible hack as every other work around for the missing named arguments feature in c++.]]></description>
			<content:encoded><![CDATA[<p>This is just as much of a horrible hack as every other work around for the missing named arguments feature in c++.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
