<?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: Pointers, References and Optional References in C++	</title>
	<atom:link href="https://www.fluentcpp.com/2018/10/02/pointers-references-optional-references-cpp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/10/02/pointers-references-optional-references-cpp/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Fri, 05 Oct 2018 09:27:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.4</generator>
	<item>
		<title>
		By: Mickey_disqus		</title>
		<link>https://www.fluentcpp.com/2018/10/02/pointers-references-optional-references-cpp/#comment-1363</link>

		<dc:creator><![CDATA[Mickey_disqus]]></dc:creator>
		<pubDate>Fri, 05 Oct 2018 09:27:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1263#comment-1363</guid>

					<description><![CDATA[On the subject of naming a handle exactly the same as if it was the thing it&#039;s a handle to. Why? That&#039;s not helpful. It&#039;s unhelpful. In my practical experience, being able to know if a thing is a handle or not is very useful. Deliberately hiding that information; what&#039;s the benefit?


&quot;And when reading code, we mostly don’t want to know anyway.&quot;
I jolly well do want to do. Of course I do. A pointer-to-an-object needs very different handling to the object itself. If I go around treating pointers and references and iterators as if they&#039;re the object of interest, my code will start crashing.



It sounds from what you say that you do want to know, but you&#039;re relying on your magic IDE to tell you with a mouse-over rather than relying on the name of the variable to tell you. The principle is the same; you&#039;ve just shifted what you like to look at to know whether it&#039;s a handle or not, from the name to a pop-up box your IDE presents.]]></description>
			<content:encoded><![CDATA[<p>On the subject of naming a handle exactly the same as if it was the thing it&#8217;s a handle to. Why? That&#8217;s not helpful. It&#8217;s unhelpful. In my practical experience, being able to know if a thing is a handle or not is very useful. Deliberately hiding that information; what&#8217;s the benefit?</p>
<p>&#8220;And when reading code, we mostly don’t want to know anyway.&#8221;<br />
I jolly well do want to do. Of course I do. A pointer-to-an-object needs very different handling to the object itself. If I go around treating pointers and references and iterators as if they&#8217;re the object of interest, my code will start crashing.</p>
<p>It sounds from what you say that you do want to know, but you&#8217;re relying on your magic IDE to tell you with a mouse-over rather than relying on the name of the variable to tell you. The principle is the same; you&#8217;ve just shifted what you like to look at to know whether it&#8217;s a handle or not, from the name to a pop-up box your IDE presents.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: MPM		</title>
		<link>https://www.fluentcpp.com/2018/10/02/pointers-references-optional-references-cpp/#comment-1355</link>

		<dc:creator><![CDATA[MPM]]></dc:creator>
		<pubDate>Tue, 02 Oct 2018 12:55:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1263#comment-1355</guid>

					<description><![CDATA[One other thing you can do with pointers as opposed to references -- technically this is form of rebinding, but it&#039;s not mentioned explicitily in the post -- is pointer arithmetic.  (The post gives of an example of direct assignment to re-bind, but not pointer arithmetic).]]></description>
			<content:encoded><![CDATA[<p>One other thing you can do with pointers as opposed to references &#8212; technically this is form of rebinding, but it&#8217;s not mentioned explicitily in the post &#8212; is pointer arithmetic.  (The post gives of an example of direct assignment to re-bind, but not pointer arithmetic).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gerald Squelart		</title>
		<link>https://www.fluentcpp.com/2018/10/02/pointers-references-optional-references-cpp/#comment-1352</link>

		<dc:creator><![CDATA[Gerald Squelart]]></dc:creator>
		<pubDate>Tue, 02 Oct 2018 05:41:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1263#comment-1352</guid>

					<description><![CDATA[&quot;the convention for references is that they should never be null&quot; -- to be pedantic, it&#039;s not just a convention, it&#039;s actually undefined behavior to dereference a null pointer, so you could not create a reference from that and expect happy outcomes. :-D  It&#039;s also UB to access a dangling reference (e.g., if the referenced object gets destroyed).]]></description>
			<content:encoded><![CDATA[<p>&#8220;the convention for references is that they should never be null&#8221; &#8212; to be pedantic, it&#8217;s not just a convention, it&#8217;s actually undefined behavior to dereference a null pointer, so you could not create a reference from that and expect happy outcomes. 😀  It&#8217;s also UB to access a dangling reference (e.g., if the referenced object gets destroyed).</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
