PDA

View Full Version : Delphi XE4 is out, supporting Windows, OS X and iOS!



LP
22-04-2013, 03:51 PM
Embarcadero Delphi XE4 has just been released, which now supports Windows, OS X and iOS platforms.

Read more information about it here (http://www.embarcadero.com/products/delphi).

czar
22-04-2013, 09:32 PM
I think I will wait.

I couldn't quickly find if you still need a Mac to develop iOS and OSX? My guess is yes. That requirement was buggy and a pain in the arse with XE2. I remain unconvinced that Embarcadero know what they are doing.

Personally I have gone cold on Delphi. I felt extremely let down by XE2. A complete waste of money and no support. I am now switching my company's development away from Delphi and will instead be mixing it up using Smart Mobile Studio and Contruct 2. HTML 5 development is a perfect fit for what we do.

phibermon
22-04-2013, 09:46 PM
Very expensive. Even an upgrade from XE2 is unreasonable, especially concidering it's not even that old, this should be a service pack. Still using FPC + Lazarus for all my needs, can target all the platforms this supports and more, for free. Really not seeing why a game dev would choose this over FPC/Lazarus unless they had already bought into the license chain.

LP
22-04-2013, 11:58 PM
czar, previously to target iOS in XE 2, you had to make several intermediate steps and then use FreePascal for compilation. Now, when you press F9, the application is run directly on iOS device (or iOS simulator, if you like), and it supports latest iOS SDKs, including 6.1.x. The requirement of Mac for iOS development is dictated by Apple and their terms, since this is the only way to use Apple's own LLVM compiler along with its code optimizations.

I'm surprised about the comments about XE 2, as I think it was one of the biggest achievements (when compared to Delphi 2009, 2010 and XE), including 64-bit support and OS X compilation. Now it's a next major step for Delphi - native iOS compilation, and Android is going to follow.

I know there are several trial programs for XE 4, including so-called "instant" trial. I'd suggest trying those and see the coolness of Delphi apps running on iOS. :)

czar
23-04-2013, 12:17 AM
Cross platform was the big draw card for me with XE2. 64bit was not an issue. the iOS support was aweful and even developing for MacOS was frustrating. We spent months of work building an app that was never usuable enough. We ended up canning it.

We do all our cross platform stuff, games and apps using HTML5. It is fast enough for what we need, easy to access data works on all platforms and can be easily made to function like a native app on Apple and ANdroid tablets and phones. I can't ask for more. :)

wagenheimer
23-04-2013, 01:14 AM
Lifepower!

Tell us, what was about you secret work with Embarcadero and XE4, we are curious. I think you are not in NDA anymore and you can tell us now what were you working with! =)

Definitely I will try Delphi XE4.

Actually I use Lazarus+Freepascal for Mac/iOS port of my games, but It was so complicated to install and configure everything which I'm afraid of if I format my MAC I would not be able to configure everything again! =P. And actually debugging works for me, but It's a pain! To add an Breakpoint in my pascal code, I need to create a call to an Objective C function, add the breakpoint on the Object C function, run the game, stop in breakpoint of the Objective C function, Use the Call Trace (which does not works most of the times) to find my Pascal source code and so add the breakpoint there! I really hope Embarcadero created a more intuitive environment to create iOS applications with Delphi.

Sorry my english.

LP
23-04-2013, 02:05 AM
Tell us, what was about you secret work with Embarcadero and XE4, we are curious. I think you are not in NDA anymore and you can tell us now what were you working with! =)
The project that we were (are) working on for Embarcadero has not been released yet, I'm afraid you'll have to wait until next update with Android support. I was also involved in FireMonkey work for this release, mainly for iOS platform.



Actually I use Lazarus+Freepascal for Mac/iOS port of my games, but It was so complicated to install and configure everything which I'm afraid of if I format my MAC I would not be able to configure everything again! =P. And actually debugging works for me, but It's a pain! To add an Breakpoint in my pascal code, I need to create a call to an Objective C function, add the breakpoint on the Object C function, run the game, stop in breakpoint of the Objective C function, Use the Call Trace (which does not works most of the times) to find my Pascal source code and so add the breakpoint there! I really hope Embarcadero created a more intuitive environment to create iOS applications with Delphi.

Debugging works both in iOS Simulator and on iOS devices, similarly to how it worked on OS X and Windows. On actual device it is a bit less informative than on simulator, so if you have a problem, I'd suggest debugging on iOS Simulator first.

When deploying to device, I'd suggest disabling internal debugger and setting "release" mode - this way deployment and execution are must faster. All previous code from XE+ and up should function without modifications, but there is a new feature called "Automatic Reference Counting" similar to the one in XCode. This means that you don't have to explicitly release any of the classes, they will be released when they go out of scope (through you can release objects explicitly by assigning nil to them). There are some "tricks" to go around this, but I won't mention it here. :) As result, existing code should work (since calling to .Free assigns nil to variable), but new code can be simpler and cleaner.

There are also some new language features too, I'd suggest looking for them at Embarcadero's web site.

laggyluk
23-04-2013, 10:23 PM
The requirement of Mac for iOS development is dictated by Apple and their terms, since this is the only way to use Apple's own LLVM compiler along with its code optimizations.
marmalade sdk can compile ios (among others) apps on win. their solution isolate app code from actual os/hardware with platform specific layer

LP
24-04-2013, 05:13 AM
marmalade sdk can compile ios (among others) apps on win. their solution isolate app code from actual os/hardware with platform specific layer

In case of Delphi XE 4, it uses Apple's LLVM compiler along with its optimizations, so any benefits XCode developers get from compiling their code, the same will apply to Delphi developers. In addition, the same LLVM compiler will be (is) extended to work with Android too, which can also apply to other (future) platforms. I think this approach has much more potential than just building yet another ARM compiler from scratch. The only thing I miss in this case is inline ARM assembly, which is not possible in Delphi, but Apple's code optimizations and access to Apple's Accelerate framework give much greater benefits.

phibermon
24-04-2013, 11:13 AM
Lifepower : XE4 most certainly does not use LLVM for compilation, clang is barely stable, there's no pascal compiler for LLVM at all.

Adding LLVM support to a compiler is like adding a whole new architecture and since it took them many years to add broken support for OSX and they're STILL missing Linux, I highly doubt that they've added a brand new target for their compiler (LLVM) and got it release stable for XE4 since the last delphi.

If they have then they'll only be using it in the most simpliest sence IE for Arm compilation but even so to write a new front-end for LLVM?

Clang isn't even stable! they're no way I'd trust a LLVM front-end that had been written so quickly.

phibermon
24-04-2013, 11:33 AM
Ok just read their whitepaper, they use LLVM for ARM compilation only. still using their old compiler for Windows/OSX.

I don't know why they didn't carry on using FPC, for some bizarre reason they've chosen one open source compiler chain (LLVM) over another (FPC) using open source as a justification for doing so.

They took an already tested solution (FPC) and replaced it with a a new solution, for no good reason whatsoever.

LP
24-04-2013, 05:42 PM
phibermon, the reason to switch to LLVM, as far as I know, was due to new Delphi's language features.

According to Embarcadero Wiki (http://docwiki.embarcadero.com/RADStudio/XE4/en/DCCIOSARM.EXE,_the_Delphi_Cross_Compiler_for_the_i OS_Device):

DCCIOSARM is based on a ground-up implementation of a new compiler front end, tied to LLVM as the compiler backend.

For some new language features, check Migrating Delphi Code to iOS from Desktop (http://docwiki.embarcadero.com/RADStudio/XE4/en/Migrating_Delphi_Code_to_iOS_from_Desktop) and Automatic Reference Counting in Delphi Mobile Compilers (http://docwiki.embarcadero.com/RADStudio/XE4/en/Automatic_Reference_Counting_in_Delphi_Mobile_Comp ilers).

phibermon
25-04-2013, 01:19 AM
I did have a good read of their whitepaper, there's some changes specifically related to the handling of reference counted strings for that target. The new setup is better for certain access patterns, plus having LLVM is bonus I guess, there's a lot of good work being done in terms of optimizations for the intermediate bytecode. But that's only going to be taken advantage of with new builds of the compiler. I would be an awful lot happier with the decision if there was more of a commitment to incremently update the compiler in order to properly take advantage of the work being done on LLVM, bugs fixed etc

marcov
02-08-2013, 07:59 PM
I don't know why they didn't carry on using FPC, for some bizarre reason they've chosen one open source compiler chain (LLVM) over another (FPC) using open source as a justification for doing so.


Afaik they never planned too. FPC is GPL based, so any enhancement would have had to be donated back (*). I assume they originally used FPC mostly to speed development by developing their libs with FPC in parallel with their compiler work, but then their compiler development was slower than planned they couldn't release it. Because they made promises, they had to release something, so they released it FPC based.

FPC got a lot of flak for that (not supporting the language features of XE2), but we never a part of that decision, and Embarcadero never did any work on it themselves (or never released it)

I assume the current XE4 language limitations are just to test the water how resistant the user base is against (Java/C# imitation) change. They want the language to get a more modern face in the hope they attract new (not delphi originating) users, that demand a form of GC no matter what.

IOW I think those language incompatibilities are deliberately done, and not because of LLVM or other technical reasons.

(*) Note that there was not one single line donated back to FPC from XE2! They probably got out of their way to avoid this, though I attribute that more to lawyer paranoia than malice.