Author: Alexandru Ciobanu
The Lock keyword
What I miss the most from C# is the lock keyword. Unfortunately Delphi doesn’t (yet) have such a “feature” so we’re stuck making calls to synchronization objects manually. It’s not a big problem actually but can get quite…
Read More »Delphi “Future”
The title is probably a bit misleading. I’m not going to talk about the “future of Delphi” rather about the concept of “future evaluation” in Delphi. You might have heard about the Delphi Prism product that Embarcadero/CodeGear is…
Read More »String reverse tests
This post will be a short one. Just giving a general recommendation for people doing String processing in Delphi – use PChar or ^Char for that. I have made a simple test program that reverses a very big…
Read More »Strings, PChars and reference counting
Hi folks, in today’s post I will continue with reference counting specifics of Delphi in the particular case of Strings. We’ll start with a small example: What will the output of this program be? The obvious result (the…
Read More »C++ Builder TypeInfo alternative.
I bet most Delphi developers know about TypeInfo operator. It provides type information somehow similar to reflection in Java or .NET (of course a lot more limited). Take this simple example: It will simply write “Byte” on the…
Read More »That stupid garbage collector
I’ve heard this phrase a few times in regards to Delphi’s reference counting mechanics. Before continuing with this post please note — Delphi doesn’t have a Garbage Collector (as Java or .NET)! It uses Reference Counting as part…
Read More »Delphi 2009: reference to
It’s probably not news anymore but Delphi 2009 supports anonymous methods out of the box. To be able to support them, CodeGear developers added a new type of a “pointer to a method” called a managed method reference:…
Read More »Generics.Defaults: Bug
There is a bug in Generics.Defaults unit in Delphi 2009. If you read my previous post: Generic Defaults you should know already about the “3 bytes long” data types and how are those passed as const parameters to…
Read More »Generic Defaults
One important part of any generic collection classes are the “type support” functions. And what I mean are the functions specific to each type that perform: Comparison – will return a value indicating if A > B or…
Read More »Delphi 2009 – Exit;
A very useful and cool feature in Delphi 2009 is the Exit keyword. Yes, it’s that Exit that “returns” from a function call. So what’s so exiting about it? Nothing really – for people coming from C-like languages,…
Read More »