<?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: A Concrete Example of Naming Consistency	</title>
	<atom:link href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Wed, 18 Jul 2018 10:43:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1130</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Wed, 18 Jul 2018 10:43:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1130</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1118&quot;&gt;AndreSomers&lt;/a&gt;.

Fair enough, I get your point. Thanks or sharing your opinion about this.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1118">AndreSomers</a>.</p>
<p>Fair enough, I get your point. Thanks or sharing your opinion about this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: AndreSomers		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1118</link>

		<dc:creator><![CDATA[AndreSomers]]></dc:creator>
		<pubDate>Mon, 16 Jul 2018 15:19:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1118</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1115&quot;&gt;Jonathan Boccara&lt;/a&gt;.

Thank you for your reply. I think I disagree. I think the pointer semantics that stem from using *myWrappedValue. or myWrappedValue-&#062; will hurt at least as much as the .get() actually, though I do see your point about .get(). So no, I think I&#039;d keep the value semantics and provide something like an an unwrap() or .value() instead.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1115">Jonathan Boccara</a>.</p>
<p>Thank you for your reply. I think I disagree. I think the pointer semantics that stem from using *myWrappedValue. or myWrappedValue-&gt; will hurt at least as much as the .get() actually, though I do see your point about .get(). So no, I think I&#8217;d keep the value semantics and provide something like an an unwrap() or .value() instead.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1115</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 15 Jul 2018 21:31:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1115</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1103&quot;&gt;AndreSomers&lt;/a&gt;.

From a naming perspective, I&#039;d say that using operator* and operator-&#062; are fine, because they represent a conventional access to the value (stored in the smart pointer for example). Contrary to .get() which represent a unconventional access.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1103">AndreSomers</a>.</p>
<p>From a naming perspective, I&#8217;d say that using operator* and operator-&gt; are fine, because they represent a conventional access to the value (stored in the smart pointer for example). Contrary to .get() which represent a unconventional access.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: AndreSomers		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1103</link>

		<dc:creator><![CDATA[AndreSomers]]></dc:creator>
		<pubDate>Fri, 13 Jul 2018 09:11:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1103</guid>

					<description><![CDATA[Following your reasoning, would it make sense to follow the smart pointer API even further and use operator* and operator-&#062; for access in your opinion? 

Downside is that this of course breaks the value semantics of the type, and instead switches to pointer semantics (as smartpointers are *designed* to model).]]></description>
			<content:encoded><![CDATA[<p>Following your reasoning, would it make sense to follow the smart pointer API even further and use operator* and operator-&gt; for access in your opinion? </p>
<p>Downside is that this of course breaks the value semantics of the type, and instead switches to pointer semantics (as smartpointers are *designed* to model).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1055</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 10 Jun 2018 16:24:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1055</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1051&quot;&gt;Botet Escriba Vicente J.&lt;/a&gt;.

Ok, interesting point. Thanks for sharing Vincente!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1051">Botet Escriba Vicente J.</a>.</p>
<p>Ok, interesting point. Thanks for sharing Vincente!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jft		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1054</link>

		<dc:creator><![CDATA[jft]]></dc:creator>
		<pubDate>Sat, 09 Jun 2018 18:03:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1054</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1052&quot;&gt;Botet Escriba Vicente J.&lt;/a&gt;.

Same as adding SeatId.get() and FIlmid.get() as the underlying type is still int. You could always implement Seatid and Filmid as full class&#039;s with the required operator overloads.......]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1052">Botet Escriba Vicente J.</a>.</p>
<p>Same as adding SeatId.get() and FIlmid.get() as the underlying type is still int. You could always implement Seatid and Filmid as full class&#8217;s with the required operator overloads&#8230;&#8230;.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Botet Escriba Vicente J.		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1052</link>

		<dc:creator><![CDATA[Botet Escriba Vicente J.]]></dc:creator>
		<pubDate>Fri, 08 Jun 2018 15:45:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1052</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1025&quot;&gt;jft&lt;/a&gt;.

And you would be able to add SeatId and FilmId :(
I want the compiler prevent me from ths kind of mistakes also.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1025">jft</a>.</p>
<p>And you would be able to add SeatId and FilmId 🙁<br />
I want the compiler prevent me from ths kind of mistakes also.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Botet Escriba Vicente J.		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1051</link>

		<dc:creator><![CDATA[Botet Escriba Vicente J.]]></dc:creator>
		<pubDate>Fri, 08 Jun 2018 15:36:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1051</guid>

					<description><![CDATA[The smart pointer get and your strong-type get have not the same interface and as so usage.

unique_ptr::get give you access to the pointer but you can not change it while your strong-type::get()  allow you to modify the value. Your ::get is more like the operator*() when we see a smart_pointer as a handle of a pointee.

std::get for tuple and variant was an error. We should had tuple_get() and variant_get() or something else.

IMO, the name we want for wrapper types is underlying(). We have already that C++ scoped enums are strong types wrapping an underlying type. We are able to cast an enum over an integral type, and in particular to its underlying type, but we cannot update the value via a reference by using static_cast (https://wandbox.org/permlink/amJwtz9IBEWhrpY7).

Now the question is if we want that the access to the underlying type is by reference or by value. If the strong-type needs to ensure some constraints, it is better to don&#039;t provide a mutable access, and so the function we want return the value, and then, yes, we could reuse the ::get() function.

value() is closer to your strong-type::get. And yes, value() is already used to mean something that can throw.
I can life with a value that can throw because maybe there is no value and with one that always succeed, but having a different name seems better to me.]]></description>
			<content:encoded><![CDATA[<p>The smart pointer get and your strong-type get have not the same interface and as so usage.</p>
<p>unique_ptr::get give you access to the pointer but you can not change it while your strong-type::get()  allow you to modify the value. Your ::get is more like the operator*() when we see a smart_pointer as a handle of a pointee.</p>
<p>std::get for tuple and variant was an error. We should had tuple_get() and variant_get() or something else.</p>
<p>IMO, the name we want for wrapper types is underlying(). We have already that C++ scoped enums are strong types wrapping an underlying type. We are able to cast an enum over an integral type, and in particular to its underlying type, but we cannot update the value via a reference by using static_cast (<a href="https://wandbox.org/permlink/amJwtz9IBEWhrpY7" rel="nofollow ugc">https://wandbox.org/permlink/amJwtz9IBEWhrpY7</a>).</p>
<p>Now the question is if we want that the access to the underlying type is by reference or by value. If the strong-type needs to ensure some constraints, it is better to don&#8217;t provide a mutable access, and so the function we want return the value, and then, yes, we could reuse the ::get() function.</p>
<p>value() is closer to your strong-type::get. And yes, value() is already used to mean something that can throw.<br />
I can life with a value that can throw because maybe there is no value and with one that always succeed, but having a different name seems better to me.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1048</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Fri, 08 Jun 2018 06:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1048</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1046&quot;&gt;Micha TAnny&lt;/a&gt;.

Yes, that would work, and solves the problem of choosing a good name, since there wouldn&#039;t be one to choose to begin with! On the other hand, implicit conversions are controversial because they are harder to follow, because they don&#039;t show in code, and have the reputation to lead to subtle bugs. It&#039;s a trade-off anyway.
Thanks for your input.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1046">Micha TAnny</a>.</p>
<p>Yes, that would work, and solves the problem of choosing a good name, since there wouldn&#8217;t be one to choose to begin with! On the other hand, implicit conversions are controversial because they are harder to follow, because they don&#8217;t show in code, and have the reputation to lead to subtle bugs. It&#8217;s a trade-off anyway.<br />
Thanks for your input.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Micha TAnny		</title>
		<link>https://www.fluentcpp.com/2018/05/29/a-concrete-example-of-naming-consistency/#comment-1046</link>

		<dc:creator><![CDATA[Micha TAnny]]></dc:creator>
		<pubDate>Thu, 07 Jun 2018 15:35:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3705#comment-1046</guid>

					<description><![CDATA[Liked the article!
Personally I don&#039;t mind the As syntax but I can understand the concept.
What about using the implict cadting to convert to the type, something like:
T &#038; operator ();

Would this work?]]></description>
			<content:encoded><![CDATA[<p>Liked the article!<br />
Personally I don&#8217;t mind the As syntax but I can understand the concept.<br />
What about using the implict cadting to convert to the type, something like:<br />
T &amp; operator ();</p>
<p>Would this work?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
