tag:blogger.com,1999:blog-29331675.post5282917366224382869..comments2024-03-05T17:37:00.995+01:00Comments on The Delphi Geek: Caching with class variablesgabr42http://www.blogger.com/profile/06903558857617342477noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-29331675.post-61342452203394013002019-02-01T16:30:59.891+01:002019-02-01T16:30:59.891+01:00Thanks for sharing! I can get the point (the cachi...Thanks for sharing! I can get the point (the caching part), however, I'm having difficulty understanding the part that calculates the max value for a set - especially the use of `shl`, anyone care to explain a little bit :)<br />`<br /> if isSet then<br /> begin<br /> FMaxIntVal := 0;<br /> for i := typeData.MinValue to typeData.MaxValue do<br /> FMaxIntVal := FMaxIntVal or (1 shl i);<br /> end<br />`Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-66054261247554012622019-01-30T20:27:50.445+01:002019-01-30T20:27:50.445+01:00Nice idea to have some kind of type traits class t...Nice idea to have some kind of type traits class that gets initialized by a class constructor.Rudy Velthuishttps://www.blogger.com/profile/04591719175507325825noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-14135131100417097722019-01-30T14:39:39.612+01:002019-01-30T14:39:39.612+01:00Whatever. Definitely not the point of this exercis...Whatever. Definitely not the point of this exercise.gabr42https://www.blogger.com/profile/06903558857617342477noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-88560908584211105432019-01-30T14:30:33.358+01:002019-01-30T14:30:33.358+01:00> raise Exception.CreateFmt
why not standard E...> raise Exception.CreateFmt<br /><br />why not standard ERangeError ?Arioch, thehttps://www.blogger.com/profile/05506275753418154075noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-10767293814915183542019-01-30T14:11:09.359+01:002019-01-30T14:11:09.359+01:00Indeed, nice.
Kind of a trend in modern languages...Indeed, nice.<br /><br />Kind of a trend in modern languages to have a pair of class + singular object with the same name.<br /><br />That perhaps can be used instead of "non-inheritable class variables" that are typically used by hijacking VMTArioch, thehttps://www.blogger.com/profile/05506275753418154075noreply@blogger.com