<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-10106032.post7405996332900408272..comments</id><updated>2011-05-17T13:57:01.766+01:00</updated><category term='scripting'/><category term='DLR'/><category term='CLR'/><category term='xaml'/><category term='nexenta'/><category term='business'/><category term='visualized superstructure'/><category term='silverlight'/><category term='apple'/><category term='politics'/><category term='buy'/><category term='competition'/><category term='serialization'/><category term='printing'/><category term='RAII'/><category term='open source'/><category term='Tiburon'/><category term='bash'/><category term='CodeGen'/><category term='iterators'/><category term='acropolis'/><category term='C++'/><category term='dynamic typing'/><category term='Learning'/><category term='build'/><category term='ipod'/><category term='generics'/><category term='Delphi'/><category term='enumerators'/><category term='GC'/><category term='anonymous methods'/><category term='rich client'/><category term='solaris'/><category term='static typing'/><category term='itunes'/><category term='vista'/><category term='rant'/><category term='backup'/><category term='Erlang'/><title type='text'>Comments on Entropy Overload: Somewhat more efficient smart pointers</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.barrkel.com/feeds/7405996332900408272/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html'/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10106032.post-5692712518582313166</id><published>2011-05-17T13:42:13.589+01:00</published><updated>2011-05-17T13:42:13.589+01:00</updated><title type='text'>It is possible to implement it using 64bit memory ...</title><content type='html'>It is possible to implement it using 64bit memory block; eliminating ref-count field.&lt;br /&gt;AddRef/Release in such way should replace vtable pointer to next/prev vtable from some amount of predefined vtables. Vtable0::Release should free the memory.&lt;br /&gt;In a very rare case, when there are more references to an object than the amount of predefined vtables available, a special dynamically allocated vtable with real ref-count field should be used.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/5692712518582313166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/5692712518582313166'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1305636133589#c5692712518582313166' title=''/><author><name>stalcer</name><uri>http://www.blogger.com/profile/06511542608283334710</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-600961561'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-3689800609145884972</id><published>2009-01-14T20:36:00.000Z</published><updated>2009-01-14T20:36:00.000Z</updated><title type='text'>Fabricio - I don't think you understood that parti...</title><content type='html'>Fabricio - I don't think you understood that particular quote.&lt;BR/&gt;&lt;BR/&gt;Delphi for .NET &lt;B&gt;is&lt;/B&gt; a GC language, while  classes in C++ that use overloaded operators are generally used on a value basis, &lt;B&gt;not allocated on the heap&lt;/B&gt; (i.e. you overload the operators on values of type T, not type T*).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3689800609145884972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3689800609145884972'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1231965360000#c3689800609145884972' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-6796883568618726528</id><published>2009-01-14T19:08:00.000Z</published><updated>2009-01-14T19:08:00.000Z</updated><title type='text'>Barry said:&lt;br&gt;&lt;i&gt;User-defined operators on heap-a...</title><content type='html'>Barry said:&lt;BR/&gt;&lt;I&gt;User-defined operators on heap-allocated object instances are next to useless in a non-GC language.&lt;BR/&gt;&lt;/I&gt;&lt;BR/&gt;&lt;BR/&gt;Talk for yourself. I've used overloaded operators in C++ and Delphi.Net. Nice. And useful.&lt;BR/&gt;&lt;BR/&gt;They are a useful in ANY language, whether it have a GC or not.&lt;BR/&gt;&lt;BR/&gt;This is, of course, in my humble opinion.&lt;BR/&gt; I'll see if overloaded operators for classes have a open QC# and vote.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/6796883568618726528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/6796883568618726528'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1231960080000#c6796883568618726528' title=''/><author><name>fabricioaraujo_rj</name><uri>http://www.blogger.com/profile/01066634181074390410</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-268639582'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-5982749693738393329</id><published>2008-12-30T22:57:00.000Z</published><updated>2008-12-30T22:57:00.000Z</updated><title type='text'>Nice. I'm also working on similar solutions:&lt;br&gt;&lt;b...</title><content type='html'>Nice. I'm also working on similar solutions:&lt;BR/&gt;&lt;BR/&gt;https://forums.codegear.com/thread.jspa?threadID=9481</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/5982749693738393329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/5982749693738393329'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1230677820000#c5982749693738393329' title=''/><author><name>daywalker</name><uri>http://jankajanos.spaces.live.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1081249915'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-7094294662003576681</id><published>2008-11-17T11:30:00.000Z</published><updated>2008-11-17T11:30:00.000Z</updated><title type='text'>Vincent,&lt;br&gt;&lt;br&gt;Yes, it's like this:&lt;br&gt;&lt;br&gt;class ...</title><content type='html'>Vincent,&lt;BR/&gt;&lt;BR/&gt;Yes, it's like this:&lt;BR/&gt;&lt;BR/&gt;class operator In(Left, Right): Boolean;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7094294662003576681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7094294662003576681'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1226921400000#c7094294662003576681' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-9218758097345606204</id><published>2008-11-17T10:56:00.000Z</published><updated>2008-11-17T10:56:00.000Z</updated><title type='text'>Hi Barry.&lt;br&gt;&lt;br&gt;Not related to your main post, bu...</title><content type='html'>Hi Barry.&lt;BR/&gt;&lt;BR/&gt;Not related to your main post, but you said in your comment : &lt;I&gt;"[using records] then you can override almost all operators (even including the 'in' operator used by set operations)"&lt;/I&gt;&lt;BR/&gt;&lt;BR/&gt;Is there a hidden operator for implementing 'if a in set' (from your comment I assume that you didn't refer to an iterator 'for a in set' but to set inclusion). That would be very useful but I couldn't find any reference on it...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/9218758097345606204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/9218758097345606204'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1226919360000#c9218758097345606204' title=''/><author><name>Vincent</name><uri>http://www.blogger.com/profile/10902897502632308750</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1266380735'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-6299979580506880740</id><published>2008-11-09T20:26:00.000Z</published><updated>2008-11-09T20:26:00.000Z</updated><title type='text'>Thanks,  that all makes sense now</title><content type='html'>Thanks,  that all makes sense now</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/6299979580506880740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/6299979580506880740'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1226262360000#c6299979580506880740' title=''/><author><name>Sean</name><uri>http://www.blogger.com/profile/09419639577416328173</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1646671200'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-7848268001689547140</id><published>2008-11-07T17:06:00.000Z</published><updated>2008-11-07T17:06:00.000Z</updated><title type='text'>Sean,&lt;br&gt;&lt;br&gt;  TFunc&amp;lt;T&amp;gt; = reference to funct...</title><content type='html'>Sean,&lt;BR/&gt;&lt;BR/&gt;  TFunc&amp;lt;T&amp;gt; = reference to function: T;&lt;BR/&gt;&lt;BR/&gt;is directly equivalent to:&lt;BR/&gt;&lt;BR/&gt;  TFunc&amp;lt;T&amp;gt; = interface&lt;BR/&gt;    function Invoke: T;&lt;BR/&gt;  end;&lt;BR/&gt;&lt;BR/&gt;except that locations of a method reference type are assignable using values of a function, method or anonymous method.&lt;BR/&gt;&lt;BR/&gt;Anonymous methods are implemented as interfaces that look just like the method reference, on a hidden class. Location capture is implemented as moving (for locals) and copying (for parameters) to fields on the hidden class. Any accesses of captured locations in the body of the main procedure are converted to access the fields on the hidden class; a local variable, called $frame, points to an instance of this hidden class.&lt;BR/&gt;&lt;BR/&gt;Multiple anonymous methods in a procedure get converted into multiple interfaces implemented on the hidden class.&lt;BR/&gt;&lt;BR/&gt;Nested anonymous methods are processed in a normal way, recursively, treating the outer anonymous method just like any other method; however, accesses to symbols from the outer scope are resolved by adding a Parent field to the inner hidden class, that points to the outer hidden class&amp;#39;s instance, so that the location can be accessed.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7848268001689547140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7848268001689547140'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1226077560000#c7848268001689547140' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-7440622280220518181</id><published>2008-11-07T04:09:00.000Z</published><updated>2008-11-07T04:09:00.000Z</updated><title type='text'>Barry,&lt;br&gt;&lt;br&gt;I don't understand where the Invoke ...</title><content type='html'>Barry,&lt;BR/&gt;&lt;BR/&gt;I don't understand where the Invoke method fits in.  I assume TFunc is an interface requiring function Invoke: T; but I don't understand the mechanism behind it.  Can you explain that please?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7440622280220518181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/7440622280220518181'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1226030940000#c7440622280220518181' title=''/><author><name>Sean</name><uri>http://www.blogger.com/profile/09419639577416328173</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1646671200'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-3442097369258434618</id><published>2008-11-04T06:16:00.000Z</published><updated>2008-11-04T06:16:00.000Z</updated><title type='text'>D&amp;#39;Oh!&lt;br&gt;Sorry, please skip/delete all my prev...</title><content type='html'>D&amp;#39;Oh!&lt;BR/&gt;Sorry, please skip/delete all my previous comments... seems I only looked at the code, not at the text accompanying it... &amp;lt;blush /&amp;gt;&lt;BR/&gt;&lt;BR/&gt;Oliver</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3442097369258434618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3442097369258434618'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225779360000#c3442097369258434618' title=''/><author><name>animal</name><uri>http://www.blogger.com/profile/13989141827105859369</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-116361951'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-1017756305182450287</id><published>2008-11-04T01:00:00.000Z</published><updated>2008-11-04T01:00:00.000Z</updated><title type='text'>Good stuff!  Maybe its because I'm pretty much a D...</title><content type='html'>Good stuff!  Maybe its because I'm pretty much a Delphi-only person, I don't know, but I for one find this version easier to follow than the other versions.  In fact, more generally, finding out that anonymous methods in Delphi were implemented using interfaces made the very concept of anonymous methods easier to understand in the first place.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1017756305182450287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1017756305182450287'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225760400000#c1017756305182450287' title=''/><author><name>ccr</name><uri>http://www.blogger.com/profile/17560741389745871142</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-633637644'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-772106529989297620</id><published>2008-11-03T21:15:00.000Z</published><updated>2008-11-03T21:15:00.000Z</updated><title type='text'>Hmm, OK, I have now verified this works indeed but...</title><content type='html'>Hmm, OK, I have now verified this works indeed but I still don&amp;#39;t quite get why... ;)&lt;BR/&gt;&lt;BR/&gt;Why is TFunc&amp;lt;T&amp;gt; treated as an interface here and by what does TObjectHandle implement it?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/772106529989297620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/772106529989297620'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225746900000#c772106529989297620' title=''/><author><name>animal</name><uri>http://www.blogger.com/profile/13989141827105859369</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-116361951'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-1381235157466959272</id><published>2008-11-03T13:51:00.000Z</published><updated>2008-11-03T13:51:00.000Z</updated><title type='text'>animal,&lt;br&gt;&lt;br&gt;T is constrained to be of a class t...</title><content type='html'>animal,&lt;BR/&gt;&lt;BR/&gt;T is constrained to be of a class type, as part of TObjectHandle&amp;lt;T: class&amp;gt;. The other use of T is as a type parameter, not an interface to implement: specifically, TFunc&amp;lt;T&amp;gt; is the interface that is implemented.&lt;BR/&gt;&lt;BR/&gt;The code works just like Test2 before, except instead of OHCanary.Wrap, one uses OHCanary.Create; that&amp;#39;s pretty much it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1381235157466959272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1381235157466959272'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225720260000#c1381235157466959272' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-110379290196768597</id><published>2008-11-03T12:45:00.000Z</published><updated>2008-11-03T12:45:00.000Z</updated><title type='text'>Now I&amp;#39;m really confused... Is the example real...</title><content type='html'>Now I&amp;#39;m really confused... Is the example really correct? I somehow fail to see how the line:&lt;BR/&gt;&lt;BR/&gt;TObjectHandle&amp;lt;T: class&amp;gt; = class(TInterfacedObject, TFunc&amp;lt;T&amp;gt;)&lt;BR/&gt;&lt;BR/&gt;is supposed to be valid code. Wouldn&amp;#39;t T have to be an interface type (yet, the constraint at the beginning says &amp;quot;class&amp;quot;)? Also, I&amp;#39;m suprised by the impression that this gives that you can specify the interface to be implemented via a function reference (which to my understanding would be evaluated at runtime only) whereas I would have thought that this had to be evaluated at compile time...&lt;BR/&gt;&lt;BR/&gt;Can you maybe repost the updated complete code including sample usage?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/110379290196768597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/110379290196768597'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225716300000#c110379290196768597' title=''/><author><name>animal</name><uri>http://www.blogger.com/profile/13989141827105859369</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-116361951'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-4788745648605999286</id><published>2008-11-03T02:31:00.000Z</published><updated>2008-11-03T02:31:00.000Z</updated><title type='text'>Preemptive comment: Actually, it would be 96 bits ...</title><content type='html'>Preemptive comment: Actually, it would be 96 bits including vtable pointer. :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/4788745648605999286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/4788745648605999286'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225679460000#c4788745648605999286' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-1900040801584271869</id><published>2008-11-03T02:03:00.000Z</published><updated>2008-11-03T02:03:00.000Z</updated><title type='text'>Cesar,&lt;br&gt;&lt;br&gt;User-defined operators on heap-alloc...</title><content type='html'>Cesar,&lt;BR/&gt;&lt;BR/&gt;User-defined operators on heap-allocated object instances are next to useless in a non-GC language.&lt;BR/&gt;&lt;BR/&gt;If you are willing to wrap your object in a record, take on lifetime management, and redirect methods and properties appropriately, then you can override almost all operators (even including the 'in' operator used by set operations).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1900040801584271869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/1900040801584271869'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225677780000#c1900040801584271869' title=''/><author><name>Barry Kelly</name><uri>http://www.blogger.com/profile/10559947643606684495</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08331762029805209075'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_2GNT8vlZj48/R3BcgmnurfI/AAAAAAAAAAY/Y9PdEUicKFg/S220/big-avatar-512.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-630653472'/></entry><entry><id>tag:blogger.com,1999:blog-10106032.post-3736579453660801052</id><published>2008-11-03T01:38:00.000Z</published><updated>2008-11-03T01:38:00.000Z</updated><title type='text'>Hi Barry,&lt;br&gt;&lt;br&gt;That is something that thought re...</title><content type='html'>Hi Barry,&lt;BR/&gt;&lt;BR/&gt;That is something that thought reading your previous post, and I really misse class operators in classes, is class operators possible to be part of delphi sintax any time?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3736579453660801052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10106032/7405996332900408272/comments/default/3736579453660801052'/><link rel='alternate' type='text/html' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html?showComment=1225676280000#c3736579453660801052' title=''/><author><name>Cesar Romero</name><uri>http://www.blogger.com/profile/12143996139326176094</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.barrkel.com/2008/11/somewhat-more-efficient-smart-pointers.html' ref='tag:blogger.com,1999:blog-10106032.post-7405996332900408272' source='http://www.blogger.com/feeds/10106032/posts/default/7405996332900408272' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1533126613'/></entry></feed>
