tag:blogger.com,1999:blog-6977069.post377270937176953579..comments2022-10-27T11:40:01.409+02:00Comments on Hallvard's Blog: Highlander2 Beta: Generics in Delphi for .NETHallvards New Bloghttp://www.blogger.com/profile/09527199955524812466noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-6977069.post-77707420862680594932010-10-16T11:43:54.888+02:002010-10-16T11:43:54.888+02:00Hi dude,
I read your blog. This is a wonderful bl...Hi dude,<br /><br />I read your blog. This is a wonderful blog. I was able to get the information that I had been looking for. Thanks once again.<br /><br />-<br /><a href="http://hiredelphid.normblogs.com/" rel="nofollow">Hire Delphi Developers</a>Unknownhttps://www.blogger.com/profile/00299344934590499756noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-35579825786436063822008-11-27T19:08:00.000+01:002008-11-27T19:08:00.000+01:00Hi,Thanks for this article. I found it very useful...Hi,<BR/>Thanks for this article. I found it very useful. As a beginner to generics, I found it a bit advanced. But yes, I did go through other articles before I went through this.<BR/><BR/>http://www.kanbal.com/index.php?/Net-Frame-Work/generics-in-net-20.html[^][^]<BR/><BR/>The above can be used if you are a begineer like me. Once you read the above, this article would be cake walk. Ofcourse Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-7407663933750798542007-09-18T16:49:00.000+02:002007-09-18T16:49:00.000+02:00Thanks for your response.DavidThanks for your response.<BR/><BR/>DavidUnknownhttps://www.blogger.com/profile/02086232534105167107noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-53289695332231312622007-09-14T23:23:00.000+02:002007-09-14T23:23:00.000+02:00David:>Does the Generics implementation in Delphi ...David:<BR/><BR/>>Does the Generics implementation in Delphi require that the source code for the template definition be available?<BR/><BR/>No. As with all .NET languages generic classes can be compiled into assemblies and shared with other programmers and languages - no source required. The assemblies contain fairly highlevel CIL code and meta-data - including information about generic classes Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-41237887261201102962007-09-14T21:30:00.000+02:002007-09-14T21:30:00.000+02:00Does the Generics implementation in Delphi require...Does the Generics implementation in Delphi require that the source code for the template definition be available?<BR/><BR/>How would I distribute an API library (say) that supports generics without exposing the inner workings of the code?<BR/><BR/>David JamesonAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-83407556807858554982007-09-04T05:21:00.000+02:002007-09-04T05:21:00.000+02:00Nice write up Hallvard, thanks for posting. I just...Nice write up Hallvard, thanks for posting. I just stumbled across the Nullable Types support last week and posted about it, but I've updated to link to this article now. <BR/><BR/>Cheers<BR/>MalcolmAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-54651137081520033632007-08-29T18:20:00.000+02:002007-08-29T18:20:00.000+02:00How about generics and metaclasses/class variables...How about generics and metaclasses/class variables?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-30614431973483802322007-08-29T15:11:00.000+02:002007-08-29T15:11:00.000+02:00I see what you're saying, Hallvard, but the potent...I see what you're saying, Hallvard, but the potential for confusion seems very high with that proposed feature, both because people might think you have to do that to have a property of a generic type, and because when use "as designed" it effectively means you have multiple, overloaded properties of different types -- something Delphi doesn't allow in other contexts.<BR/><BR/>By the way, thanks Craighttps://www.blogger.com/profile/02430615130349705538noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-48569576568185543752007-08-29T10:26:00.000+02:002007-08-29T10:26:00.000+02:00Hi Hallvard,nice to read another post from you! A ...Hi Hallvard,<BR/><BR/>nice to read another post from you! A month ago I tried to write an email regarding your last blog post. Did you receive that?Heiko Behrenshttps://www.blogger.com/profile/10258390900638910543noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-90120248893854907002007-08-29T09:32:00.000+02:002007-08-29T09:32:00.000+02:00> How about nullable types?Good question! ;)Nullab...> How about nullable types?<BR/><BR/>Good question! ;)<BR/><BR/>Nullable types are based on generics and the Nullable<T> generic struct. Currently it seems that Delphi for .NET does not have any special shortcut-syntax for this (such as int? in C# for Nullable<int>), but you can use the Nullable type just like any other generic type:<BR/><BR/>var<BR/> i: Nullable<integer>;<BR/>Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-22176104770288347122007-08-29T06:43:00.000+02:002007-08-29T06:43:00.000+02:00How about nullable types?How about nullable types?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-72108313991675118352007-08-29T04:14:00.000+02:002007-08-29T04:14:00.000+02:00Nice overview - thanks for posting! I'm very much...Nice overview - thanks for posting! I'm very much looking forward to this in the next major native-based release. Hopefully they implement this for properties, too.<BR/><BR/>I'm curious how this would look on the native side in terms of RTTI. I'm a big fan of Delphi's RTTI and I'd like to see it extended more than it currently is - ie, generating RTTI for more than just published members; an 'Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-52496053674361043372007-08-28T22:54:00.000+02:002007-08-28T22:54:00.000+02:00Craig:The difference is that the record's property...Craig:<BR/>The difference is that the record's property just uses the type paramter from the record - that works fine:<BR/><BR/>property SomeThing: T <BR/><BR/>What doesn't work is introducing a <B>new</B> type parameter on the property itself:<BR/><BR/>property SomeThing<U>: U<BR/><BR/>Even though it does work on methods:<BR/> <BR/>function SomeThing<U>: U;Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-58959205083773396582007-08-28T22:47:00.000+02:002007-08-28T22:47:00.000+02:00You show an example of a working generic property ...You show an example of a working generic property in the record example. How is that different from the "missing" feature you say C# and Delphi don't support? It seems to me like it does what you ask.Craighttps://www.blogger.com/profile/02430615130349705538noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-26871939470242776882007-08-28T22:01:00.000+02:002007-08-28T22:01:00.000+02:00Hallvard --Great summary. Thanks --NickHallvard --<BR/><BR/>Great summary. Thanks --<BR/><BR/>NickNickhttps://www.blogger.com/profile/11064374653331712448noreply@blogger.com