<?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"
	>
<channel>
	<title>Comments on: Generics: Not Just for Lists</title>
	<atom:link href="http://blogs.teamb.com/craigstuntz/2008/08/07/37829/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.teamb.com/craigstuntz/2008/08/07/37829/</link>
	<description>C# • Delphi • Entity Framework • Functional Programming • InterBase • MVC • .NET • Web</description>
	<pubDate>Tue, 07 Sep 2010 11:03:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Daniel Lehmann</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/08/07/37829/#comment-3733</link>
		<dc:creator>Daniel Lehmann</dc:creator>
		<pubDate>Fri, 08 Aug 2008 09:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/2008/08/07/37829#comment-3733</guid>
		<description>About Nullables, have a look at what Nick Hodges said about them:

http://blogs.codegear.com/nickhodges/2008/07/31/39092#comment-19975

So it should be possible to create our own Nullable Type there will probably no default implementation in the rtl (what a shame). Sounds like everyone will have competing TNullable's then :( And of course without language support "Integer?" or Chrome's "mySomething::SomeMember" they are only half the fun...</description>
		<content:encoded><![CDATA[<p>About Nullables, have a look at what Nick Hodges said about them:</p>
<p><a href="http://blogs.codegear.com/nickhodges/2008/07/31/39092#comment-19975" rel="nofollow">http://blogs.codegear.com/nickhodges/2008/07/31/39092#comment-19975</a></p>
<p>So it should be possible to create our own Nullable Type there will probably no default implementation in the rtl (what a shame). Sounds like everyone will have competing TNullable&#8217;s then <img src='http://blogs.teamb.com/craigstuntz/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> And of course without language support "Integer?" or Chrome&#8217;s "mySomething::SomeMember" they are only half the fun&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jolyon Smith</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/08/07/37829/#comment-3732</link>
		<dc:creator>Jolyon Smith</dc:creator>
		<pubDate>Thu, 07 Aug 2008 21:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/2008/08/07/37829#comment-3732</guid>
		<description>On Nullable, you forgot to mention that Variant has a formal Null identity.  Of course, Variant has it's own issues, but for completeness...  :)

One problem I see with Nullable is - surely - that the result is not directly usable as a scalar, or is it?

i.e. given:

  a: Integer;
  b: Nullable;

could I write:

    a := b
    if a &#62; b then

etc?  Maybe this works transparently in .NET (dunno) but in a Win32 implementation?  It would be interesting to find out (and, if it does, how?)


I also wonder how important Null is to application code generally - typically (ime) a Null in the DB is interpreted by an application as representing some internally defined value - i.e. not set by the user/data, so determined by the system.

Sometimes, yes, simply to indicate Null or "No Value", but more often (ime) to mean "the system defined default value, whatever that is in this revision or build of the system", which isn't actually null but some definite value.

So to that extent, the need to carry a Null flag around with a value the whole time is unwarranted if the only time that the null-quality of a value is at the application/DB boundary.

Of course, ymmv.


As with anon methods (and a lot of other things), I personally don't think it's possible to identify a set of conditions that prescribe when you *should* use any particular language feature.

You can only identify those cases where you *could*.  But whether you should or not depends on a other factors that will vary from case to case.

I can see how I might (dare i say "hopefully") use generics in my multicast events implementation.  It will require that the implementation allows the use of event signature types as the parameter to a type:

TMultiCast

Even if this is possible, whether I should or not is a separate question.

For one thing, by doing so I will at a stroke deny access to my code to anyone not using Tiburon.

That's going to be a mighty tough call for anyone creating code that they intend, or hope, will be used by other people.</description>
		<content:encoded><![CDATA[<p>On Nullable, you forgot to mention that Variant has a formal Null identity.  Of course, Variant has it&#8217;s own issues, but for completeness&#8230;  <img src='http://blogs.teamb.com/craigstuntz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One problem I see with Nullable is - surely - that the result is not directly usable as a scalar, or is it?</p>
<p>i.e. given:</p>
<p>  a: Integer;<br />
  b: Nullable;</p>
<p>could I write:</p>
<p>    a := b<br />
    if a &gt; b then</p>
<p>etc?  Maybe this works transparently in .NET (dunno) but in a Win32 implementation?  It would be interesting to find out (and, if it does, how?)</p>
<p>I also wonder how important Null is to application code generally - typically (ime) a Null in the DB is interpreted by an application as representing some internally defined value - i.e. not set by the user/data, so determined by the system.</p>
<p>Sometimes, yes, simply to indicate Null or "No Value", but more often (ime) to mean "the system defined default value, whatever that is in this revision or build of the system", which isn&#8217;t actually null but some definite value.</p>
<p>So to that extent, the need to carry a Null flag around with a value the whole time is unwarranted if the only time that the null-quality of a value is at the application/DB boundary.</p>
<p>Of course, ymmv.</p>
<p>As with anon methods (and a lot of other things), I personally don&#8217;t think it&#8217;s possible to identify a set of conditions that prescribe when you *should* use any particular language feature.</p>
<p>You can only identify those cases where you *could*.  But whether you should or not depends on a other factors that will vary from case to case.</p>
<p>I can see how I might (dare i say "hopefully") use generics in my multicast events implementation.  It will require that the implementation allows the use of event signature types as the parameter to a type:</p>
<p>TMultiCast</p>
<p>Even if this is possible, whether I should or not is a separate question.</p>
<p>For one thing, by doing so I will at a stroke deny access to my code to anyone not using Tiburon.</p>
<p>That&#8217;s going to be a mighty tough call for anyone creating code that they intend, or hope, will be used by other people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Fosdal</title>
		<link>http://blogs.teamb.com/craigstuntz/2008/08/07/37829/#comment-3731</link>
		<dc:creator>Lars Fosdal</dc:creator>
		<pubDate>Thu, 07 Aug 2008 21:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/2008/08/07/37829#comment-3731</guid>
		<description>I have to admit I am practically drooling over Generics for Win32.   Really powerful stuff!</description>
		<content:encoded><![CDATA[<p>I have to admit I am practically drooling over Generics for Win32.   Really powerful stuff!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
