Posted by on in Blogs
Delphi check-in log entries of the day: 25232 trunk/com/ scanner.c Thu Oct 8 20:41:10 2009 UTC ytagawa Log:[dcc64] (scanner.c) Don't define ASSEMBLER for x64 for awhile. 25224 trunk/com/ codegen.c Thu Oct 8 12:35:00 2009 UTC eboling Log:Refactoring in PassParams to support changes to stack alignment code. Changed the logic for aligning the stack for parameter lists for the Mac. I’ll just leave that little tidbit for you all to chew on for a now. I’ve seen a lot of rampant speculation and and angst surrounding the release of the ...

Posted by on in Blogs
What happened to version 13? During the RAD Studio 2010 field test and now out in the Delphi non-tech newsgroups, there had been a lot of discussion, speculation and even some angst about the mysterious lack of version 13. Chill folks. The story is simple with no real conspiracies involved. In fact, the only conspiracy involved was that we knew from the outset that it would spark discussion and conspiracies. After each product release there is a period of time where the internal developer builds overlap with the released pr...

Posted by on in Blogs
Class Constructors. Popping the hood. My last post introduced class constructors and destructors, a new language feature in Delphi 2010. I mainly covered what they were and what kinds of things they’re good for. In this post I’ll cover some of how they’re implemented. I’m sure the question on everyone’s mind is when and how they’re invoked? If you were patient enough to read my entire post, I provided a hint as to the inner workings. The rule for when they run is simple: All eligible class constructors and class destructors are i...

Posted by on in Blogs
Class (, Static, or Shared) Constructors (and Destructors) In my last post, I hinted at a new native Delphi language feature, class constructors and destructors. For those familiar with, say, C# or VB.NET, they are called a ‘static’ constructor (C#), or a ‘shared’ constructor (VB.NET). Let’s now take a closer look at them in terms of how they’re useful along with a little hint at how they’re implemented. Class constructors had been available in Delphi Prism, but until Delphi 2010, they were notably absent from native Delphi. The main reason for this was...
Tags: CodeGear

Posted by on in Blogs
Exceptional Procrastination I kept putting this post off… ok, ok… that was a really bad pun… Seems there was a little bit of concern about my last post regarding the new ‘delayed’ directive. Christian Wimmer had a few critiques regarding the implementation and how the exception that was raised was an EExternalException with an obscure exception code. There is a simple explanation for this. The delay load helper functions were taken directly from the C++Builder RTL. By that I mean, the delayhlp.c file gets built to a .obj f...
Tags: CodeGear

Posted by on in Blogs
Procrastinators Unite… Eventually! We’re all taught at an early age to “Never put off until tomorrow that which can be done today.” In general, that is wise advice. However there are some cases where you do want to wait until the last possible moment to do (or not do) something. In fact, that is one of the overall tenets of  Agile Programming; delay decisions until the last possible moment because you always know more about a problem tomorrow than you do today and can make a better, more informed decision. But, I digress. I’...
Tags: CodeGear
The “Nitty Gritty” details on Casting an Interface Reference in Delphi 2010 Malcolm Groves let loose on a new Delphi compiler feature where you can now cast an interface reference to the implementing Delphi class. Joe White was interested in the “gritty” details about how this was implemented. It turns out that it was deceptively easy once I figured out the internal compiler logic for handling “is” tests and “as” and hard casts. All three cases use the same internal mechanism implemented in the Delphi RTL. Because all Delphi interfaces have three core methods, QueryInte...
Tags: CodeGear

Posted by on in Blogs
A Tempest in a Teapot or something more sinister? If you’re a well connected internet maven who also happens to be a Delphi user, you’re probably no doubt aware of some of the recent reports about a new virus/trojan threat that hits pretty close to home. There are many reports among the mainstream internet press that are discussing the emergence of a virus affectionately known as the “Compile-a-virus” or by the more mundane and sanitary name, W32/Induc-A. It seems that this particular virus is targeting older versions of Delphi (specifically De...
Tags: CodeGear

Posted by on in Blogs
One Year In. Now that we’re officially one year into the whole transition from being part of Borland and now part of Embarcadero Technologies, I figure it is now safe to show this. When the CodeGear segment of Borland was announced, we scrambled to produce the ever-important t-shirts and other CodeGear branded items. Since the intent was to clearly indicate that CodeGear was from Borland, we came up with a tagline. The official tagline was “CodeGear: A new company born of Borland” Nice clean message. Clear m...
Tags: CodeGear

Posted by on in Blogs
Better smart-linking through class construction Singletons, global services, and initialization. Most Delphi folks (myself included) don't really think about the impact of these things on how much code is being linked into their application. How many of you have your own stable of utility functions scattered throughout some number of units? You rely on these things everyday and would tend to feel naked without them. Even when you bang out that little test or utility app, those units are the first thing that goes into your uses clause. Have yo...

Check out more tips and tricks in this development video: