<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: C++ adventures into the land of method&#8217;s calling</title>
	<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/</link>
	<description>DFWBL !!!</description>
	<pubDate>Wed, 07 Jan 2009 01:52:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: rince</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-128</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-128</guid>
					<description>Question you need to ask yourself is what c++ functionality do you need to justify dynamic objects like that. &lt;BR/&gt;&lt;BR/&gt;Are you going to build object hierarchies with virtual methods? etc.. etc... ?&lt;BR/&gt;&lt;BR/&gt;If not and you just want to give your code a c++ look then why not have something like&lt;BR/&gt;&lt;BR/&gt;class scene_m3d&lt;BR/&gt;{&lt;BR/&gt;   public:&lt;BR/&gt;      static scale( scene_m3d *pScene );&lt;BR/&gt;    .&lt;BR/&gt;    .&lt;BR/&gt;    .&lt;BR/&gt;&lt;BR/&gt;};&lt;BR/&gt;&lt;BR/&gt;and then in your code&lt;BR/&gt;&lt;BR/&gt;   scene_m3d::scale( pScene );</description>
		<content:encoded><![CDATA[<p>Question you need to ask yourself is what c++ functionality do you need to justify dynamic objects like that. <BR/><BR/>Are you going to build object hierarchies with virtual methods? etc.. etc&#8230; ?<BR/><BR/>If not and you just want to give your code a c++ look then why not have something like<BR/><BR/>class scene_m3d<BR/>{<BR/>   public:<BR/>      static scale( scene_m3d *pScene );<BR/>    .<BR/>    .<BR/>    .<BR/><BR/>};<BR/><BR/>and then in your code<BR/><BR/>   scene_m3d::scale( pScene );
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: ragin' lion</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-129</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-129</guid>
					<description>I must be seeing things ... Kaz &amp; C++ code?  Oh dear! 8P&lt;BR/&gt;&lt;BR/&gt;Rince I see that your favorite &quot;static&quot; method comes to the rescue again!&lt;BR/&gt;&lt;BR/&gt;I agree with Rince Mr. Kaz, how you use the C++ features should depend on the situation/context.  Of course, based on Rince's example, one could ask what's the point of making those things into a class?</description>
		<content:encoded><![CDATA[<p>I must be seeing things &#8230; Kaz &#038; C++ code?  Oh dear! 8P<BR/><BR/>Rince I see that your favorite &#8220;static&#8221; method comes to the rescue again!<BR/><BR/>I agree with Rince Mr. Kaz, how you use the C++ features should depend on the situation/context.  Of course, based on Rince&#8217;s example, one could ask what&#8217;s the point of making those things into a class?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Davide Pasca</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-130</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-130</guid>
					<description>Avoid the &lt;I&gt;this&lt;/I&gt; seems a bit drastic for one that is trying to make a compromise 8)&lt;BR/&gt;Recently in C, I've been calling the main object as T. Something like:&lt;BR/&gt; m3d_scene_load( m3d_scene_t *T )&lt;BR/&gt; ..seems pretty clean, and not confusing if considering that the main object is really just one.&lt;BR/&gt;In C++ instead I put an underscore in front of the class members.&lt;BR/&gt;In C, I use the underscore to classify globals, so it sort of makes sense (class members are global to the method in which they are used).&lt;BR/&gt;An underscore in front is nice because doesn't add clutter.&lt;BR/&gt;Some may say that underscore in front may reflect some hidden global variable for the OS.. yeah whatever !</description>
		<content:encoded><![CDATA[<p>Avoid the <I>this</I> seems a bit drastic for one that is trying to make a compromise 8)<BR/>Recently in C, I&#8217;ve been calling the main object as T. Something like:<BR/> m3d_scene_load( m3d_scene_t *T )<BR/> ..seems pretty clean, and not confusing if considering that the main object is really just one.<BR/>In C++ instead I put an underscore in front of the class members.<BR/>In C, I use the underscore to classify globals, so it sort of makes sense (class members are global to the method in which they are used).<BR/>An underscore in front is nice because doesn&#8217;t add clutter.<BR/>Some may say that underscore in front may reflect some hidden global variable for the OS.. yeah whatever !
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: rince</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-131</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-131</guid>
					<description>You still havent answered my question, mf!!!&lt;BR/&gt;&lt;BR/&gt;What features of c++ are you going to use?&lt;BR/&gt;&lt;BR/&gt;So far I didn't see anything in your post that justified using c++.&lt;BR/&gt;&lt;BR/&gt;If you are just going to rewrite c code into c++ then static functions are the closest you can get.</description>
		<content:encoded><![CDATA[<p>You still havent answered my question, mf!!!<BR/><BR/>What features of c++ are you going to use?<BR/><BR/>So far I didn&#8217;t see anything in your post that justified using c++.<BR/><BR/>If you are just going to rewrite c code into c++ then static functions are the closest you can get.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Davide Pasca</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-132</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-132</guid>
					<description>I'm not sure what I'm trying to do, because it's an experiment 8)&lt;BR/&gt;First of all, I wanted to see if I could use the class-&gt;method() notation in a way that is not so confusing to me.&lt;BR/&gt;&lt;BR/&gt;One more thing I noticed is that I'm not so sure if I want to write a function for every value I want to get and set. It's kind of nice to directly access to arrays for example. In the end they are pretty simple structures, no need to wrap them with methods. That also works best at debug time.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what I&#8217;m trying to do, because it&#8217;s an experiment 8)<BR/>First of all, I wanted to see if I could use the class->method() notation in a way that is not so confusing to me.<BR/><BR/>One more thing I noticed is that I&#8217;m not so sure if I want to write a function for every value I want to get and set. It&#8217;s kind of nice to directly access to arrays for example. In the end they are pretty simple structures, no need to wrap them with methods. That also works best at debug time.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: rince</title>
		<link>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-133</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://v3.kazzuya.com/c-adventures-into-the-land-of-methods-calling/#comment-133</guid>
					<description>Yeah the get and set is another issue. &lt;BR/&gt;&lt;BR/&gt;If I have that then I make the variable public otherwise you end up with pages and pages of 'get' and 'set' functions in your class declaration.</description>
		<content:encoded><![CDATA[<p>Yeah the get and set is another issue. <BR/><BR/>If I have that then I make the variable public otherwise you end up with pages and pages of &#8216;get&#8217; and &#8217;set&#8217; functions in your class declaration.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
