views:

965

answers:

7

I've been very happy with the Delphi IDE for programming in Delphi.

But I've heard about the Lazarus programming environment, and I've also heard that some Delphi programmers use it instead of the Delphi IDE.

What are the advantages that Lazarus has over the Delphi IDE, and why would, or should a Delphi programmer switch to it?


The answers are leaving me with more questions than I had before. There seems to be some disagreement as to whether Lazarus can or cannot be used as an editor in developing Delphi code. I guess I thought you could leave everything in Delphi and just change IDEs. The Lazarus for Delphi Users section of the Lazarus Wiki says:

The first thing to do when converting a Delphi project
Having opened Lazarus, you should go to to Tools and then Convert Delphi Project to Lazarus Project. This won't do everything for you, but nonetheless will take you a good deal of the way. Note that the Lazarus IDE's conversion tools are generally one-way conversions. If you need to retain Delphi compatibility so you can compile your project with both Delphi and Lazarus, consider converting your files with the XDev Toolkit instead.

Because Lazarus is free is not a reason to switch, but does not penalize you in physical $'s for switching. (You will still have to invest your time to convert and learn. Time = $).

My as-much-as-I-understand conclusions from your answers as to why someone might switch from Delphi to Lazarus: obviously it must be providing something that Delphi currently can't. Currently that is multiplatform support and possibly 64-bit support. Delphi did have Kylix at one time, but not Mac support.

But with both of those and 64-bit promised soon by Embarcadero, you've answered my question by telling me there's no reason (at least for me) to switch.

+3  A: 

The two main reasons for me are

1) Multiplatforms support (Linux, Mac OS X, Windows)

2) The price $0

RRUZ
@RRUZ: But don't you have to purchase Delphi anyway to use it within Lazarus? Then you've already got the Delphi IDE, sort of at no extra cost.
lkessler
@lkessler, Lazarus don't have any commercial relation with Delphi, they are two different products.
RRUZ
Yes, we know that, Rruz. But since you already have Delphi, why would you use Lazarus to write your Delphi code instead of just using Delphi? (You must have Delphi, or else you wouldn't be a Delphi programmer, and recall that this question specifically asks why a *Delphi programmer* would use Lazarus.)
Rob Kennedy
@Rob, in my personal experience , I use lazarus, instead of Delphi, when I needed to develop a Linux desktop application for my customers. because unfortunately, Delphi still does not support Linux.
RRUZ
@Rob: Well, I would probably use it if I had to (natively) target a platform that Delphi does not yet support (such as 64bit!!!) and didn't want to learn a new language - all the while hoping that the project could later be ported back to Delphi once Embarcadero add support for the target in question.
Oliver Giesen
@Rob - some years ago CodeGear decided to "clarify" what "Delphi" was... they decided to create a Delphi "brand", giving us "Delphi Prism" (the Delphi language in the Visual Studio IDE), "Delphi" (Delphi language in the RAD Studio IDE) and "Delphi for PHP" (neither Delphi language NOR RAD Studio IDE - basically nothing what-so-ever to do with "Delphi" other than by decree). (continued...)
Deltics
@Rob (...continued) So it is possible to use Lazarus to "do Delphi" by the *original* and most sensible definition of Delphi as a specific variant of the Object Pascal language, with which FPC is compatible, rather than the later definition as an IDE or framework product or "brand".
Deltics
The way I see it, @Deltics, people who don't write code intended to eventually be compiled by `dcc32.exe` are not Delphi programmers. (Let's ignore Prism for now.) They might intend for their code to *also* be compiled by `fpc` or `fpc.exe`, and that's fine, but if they aren't using the Delphi compiler at some point, then I don't think they fit the demographic mentioned in the question, "Delphi programmers [who] use [Lazarus] instead of the Delphi IDE." All I see are answers about people who don't use Delphi at all, or who use Delphi for their Delphi projects and Lazarus for their other stuff.
Rob Kennedy
I'm a FPC developer nowadays, but thirtheen years ago I started with FPC because Delphi couldn't generate CGI's for my (FreeBSD) web-account.
Marco van de Voort
+4  A: 

Lazarus is cross-platform and free.

glebm
@glebm: But Delphi isn't cross-platform (yet).
lkessler
So, are you saying that you write your *Delphi* programs on something other than Windows? Why else would it matter that Lazarus is cross-platform?
Rob Kennedy
Cross-platform meaning you can write on Windows and then compile it for Mac or Linux as well
glebm
@Ikessler Delphi isn't, Lazarus is. Lazarus doesn't use Delphi at all, it uses FreePascal compiler.
glebm
Then, Glebm, are you saying that you *don't* compile your code with the Delphi compiler?
Rob Kennedy
That is, indeed, what I am saying. Lazarus uses a different Pascal compiler (FPC).
glebm
So, if you don't use Delphi at all, then how are you a Delphi programmer? And if you're *not* a Delphi programmer, then could you please clarify why you think this answer would be appropriate for people who *are* Delphi programmers?
Rob Kennedy
Delphi the language <> Delphi the IDE.Delphi is a name of a language (that was called Object Pascal before Borland Delphi 7 came out). The language that the FreePascal compiler compiles from is Delphi the language (99%). Delphi compiler, which also compiles from Delphi the language, is, however, a completely different product. I hope that clears things up a bit for you. I am not a "Delphi programmer", I am a Software Developer. :)
glebm
For further reading on Object Pascal (another name for Delphi): http://en.wikipedia.org/wiki/Object_Pascal
glebm
FPC still names it Object Pascal, since Delphi is trademarked. While it isn't perfect (there are multiple Object Pascals, like Apple's, though most of them are dead or near dead) it reflects its pedigree, and is wellknown, so it is IMHO better than some synthetic new name.
Marco van de Voort
+10  A: 

Well a Delphi programmer cannot use Lazarus to write Delphi code because Lazarus is not Delphi. Lazarus is actually an IDE and a bunch of Delphi-ish class libraries for Free Pascal. But note, things like Delphi's VCL is not there, and to be perfectly blunt the IDE and debugging experiences in Lazarus are pretty spotty, however it is free, so that counts for a lot.

Bottom line, Delphi != Lazarus. Use Delphi if you want a great IDE and debugger huge 3rd party support and tech suport you are targeting MS Windows, plus you are willing to pay for it. Use Lazarus (free pascal) if you want a Free IDE that supports multiple platforms and has a Delphi-ish syntax.

Tim Jarvis
A Delphi programmer certain *could* use Lazarus to write Delphi code. Heck, a Delphi programmer could even use Notepad to write Delphi code. The premise of this question is that there *are* Delphi programmers who use Lazarus to write *Delphi* code (not Free Pascal code). Ikessler asks why they would do that. If your answer is to deny the premise, then could you please be more explicit about it? Otherwise, I don't see how you've answered the question at all.
Rob Kennedy
Hey Rob,Perhaps I should have said to write and compile Delphi code. sure you can write Delphi code in anything. My point was the dialect of pascal and the class libraries used in the 2 products whilst similar are not interchangeable. (except in the very simplest of cases)
Tim Jarvis
I've Lazarus on my private laptop. With recent versions, I've setup projects (visual ones even) on that laptop and then loaded them into delphi at work. With some DFM cleaner tool it is not much different then moving between Delphi versions
Marco van de Voort
+6  A: 

Maybe I'm just reading this wrong, but you seem to be under the impression that the IDEs are somehow interchangeable. That's not correct. Lazarus is built on top of the FPC compiler and is tied to it in much the same way that Delphi is tied to the DCC compiler. Also, they use different form description file formats. Delphi can't read LFMs, and Lazarus can try to read DFMs but it doesn't do a particularly good job of it.

FPC/Lazarus is very similar to Delphi, but it's a different dialect of Object Pascal and it would be a mistake to think they're equivalent.

Mason Wheeler
Why cant Lazarus read text based DFMs, that seems crazy? Its a really simple format.
Toby Allen
@Toby: I don't really know. It sort of can, but what you get ends up looking all wrong. Controls in the wrong positions, etc.
Mason Wheeler
Mason: did you tried with a new project, or opening old lazarus code? Basic form editing was fairly compatible to me. If you used older Lazarus projects, some of the older workarounds for unsupported Delphi functionality might cause problems.
Marco van de Voort
@Marco: I tried with converted Delphi projects. It's been a while since I last tried, but every time in the past that I've attempted it, it gets the form layouts completely wrong.
Mason Wheeler
Also happens with different delphi versions.
Marco van de Voort
+4  A: 

Main reason for me - Delphi cannot currently compile 64bit apps and as such cannot see, read or write certain registry keys.

TheSteven
+4  A: 

I have a sound recognizing algorithm running on Delphi. When my superior asked to run it on WinCE I tried Lazarus. Pascal is Pascal. Lazarus is super. I have done it.

Algorithm is written in Pascal. I tried to convert. C# was prone to decompile and used different logic. Luckily I've found Free Pascal.

I have it running on WinCE on ARM. Thanks to all FPC collaborators.

edit: I have it running on Linux too.

Celal Ergün
+3  A: 

Yes, Linux is installed on 70% of servers. It is powering the Facebook which has 400,000,000+ users. And you tell me to use Windows? You tell me not to use 64 bit?

I will use Lazarus. Until Delphi catches on.

Celal Ergün