So XE7 came out today. I downloaded it and installed it, curious about some of the stuff I’d heard.
So first, the installation experience. I really have no idea why it’s so needlessly complicated, but in order to install Delphi with the Android support, you need to do the whole thing twice: once without it and then again for the “add-on”. (Yeah, I got it. Remember my complaint a year ago about Embarcadero’s handling of all this? Well, to my surprise they actually listened!) The second install doesn’t seem to be installing an add-on; it looks like it’s running the entire installation process again! Why?!?
But despite the excessively lengthy installation process, everything went smoothly, with no interruptions, errors, or requests after it started actually installing things. That’s a huge improvement over the early Embarcadero days!
Next, I opened up the \source folder in Beyond Compare, checking it against XE6’s RTL. It found changes all over the place, but the vast majority of them were minor refactoring things. The only significant thing I found (outside of the cross-platform stuff, which I admittedly didn’t look too closely at) was the addition of the System.Threading unit, which adds a thread pool, a Task class, a Future<T> class, and a TParallel static class offering two basic functions: For and Join. (Join, as near as I can tell, is a special type of parallel for loop that works on an array of function pointers. Not sure why that’s something distinct from the normal parallel for loop.)
Also, there have been some syntactic improvements in array handling. It’s possible to declare a new array literal surrounded by brackets rather than parenthesis, like DWS and Oxygene. But there seem to be a few quirks in it.
GOOD: array of integer = [1, 2, 3, 4]; //this works
BAD: array of integer = (1, 2, 3, 4); //error
GOOD2: array [0..3] of integer = (1, 2, 3, 4); //this works
values: array of integer;
values := GOOD; //[dcc32 Error]: E2008 Incompatible types
values := GOOD2; //[dcc32 Error]: E2010 Incompatible types:
// 'Dynamic array' and 'array[0..3] of Integer'
values := [1, 2, 3, 4]; //this works
values := values + [5, 6, 7]; //this works too! Yay!
However, if “GOOD” and “values” are both defined as TArray<integer> instead, it compiles and works as expected. So it’s the ancient Pascal array identity problem rearing its ugly head once more. Delphi has improved on enough classic Pascal points where room exists for improvement; why doesn’t it just finally make “array of X” always assignment-compatible with itself and get it over with? DWS does that and it works just fine!
The array concatenation syntax is interesting, though to be perfectly honest I don’t see much of a use case for it. But being able to do it is kind of cool, I guess.
So that’s it for now. I think enough things have finally improved in the language to make it worth taking a serious look at updating the TURBU codebase (currently still on XE) to the new version. I’ll have to see what that process is like.
So, what’s your first impression of XE7? As always, comments are welcome, but please note that it is not actually a first impression if you haven’t actually installed and used the product yet. 🙂