Lazarus Review

Author: Dave
Date: 03.15.14 - 6:45am

For the last month I have been exploring the Free Pascal language and Lazarus IDE.

The reason for this is because I do no want to depend on MS for the future of my applications running, and there are some capabilities I desire which VB6 does not have. (even though most of them would be not so hard to add I think):

The things that attract me to free pascal are:
  • x64 compilation
  • easy string handling
  • language is easy to transition to for VB6 users
  • unsigned and 64bit numeric types
  • rapid application development environment with all standard UI elements.
  • native compile with no external dependencies
  • same source will compile and run on Linux, Windows and many other platforms.
  • easy to integrate in with standard C modules
  • ability to create standard DLLs for use in other languages
  • capable of using pointers, inline asm, raw memory access
  • easy to use the WinApi directly if required
Overall I have been very impressed with the language. In fact the free pascal compiler and the IDE itself is all written in free pascal, and is completely open source. Dont like the way something works? change it! Once you learn the language, all the keys to this entire kingdom open before you. I LOVE that!

Lazarus IDE has been ver stable for me, I even installed it on a raspberry pi and compiled a quick program to test it.

The IDE is not as efficient to use yet as vb6. It has all of the capabilities I want, but still feels a little bit like a work in progress. Here are some wish lists:
  • debugging experience is not great, you can mouse over variables to get their values (usually) but there is no edit and continue (it may be there but you probably have to set a watch and use a separate window)
  • asm level debugger is there, but registers, memory, etc are all in scattered in separate windows
  • in general everything is in its own window, scattered all over your desktop, they save position but if you move or resize one, the others dont follow. The docking plugin didnt seem to work for me. this is fragmented and annoying.
  • There is a code navigator, again in its own window, I would love the drop downs like VB6 has to list and jump to functions. They do have a powerful code browser however which lets you search classes and methods of an entire project very efficiently. When you click an entry though it seems to only bring you to the declaration and not the implementation. Then you have to use a key sequence of CTRL-SHIFT-DOWNARROW to jump to implementation. Not bad if you know it exists I guess.
  • I would love function prototypes to display as an tooltip when you start typing in arguments. You can mouse over the function to get them, but they disappear once you type. Also you have to go into options and set the timeout to display them down low to really use them. The delay for intellisense is the same way. (update: I submitted a patch that adds this option)
  • I dont know how they survive with out an Instr like function. Luckily you can find a user created one online.
  • were back to .net levels of noise in the intellisense lists. Powerful and useful yes, but I would recommend some IDE option to hide advanced and rarely used stuff by default, and maybe reshow if a certain key sequence was hit.
  • COM integration is not great, and you have to relaunch the IDE to add new items to the toolbox. The type lib importer has some bugs. (update: I submitted a patch that adds searchable lists to select the activex control instead of having to find the file manually)
  • The LCL is the lazarus component library. Its awesome, but big. An average exe size using it is 1.2mb. A minLCL package might be cool if it could cut that down to 200-400k. Then again UPX can almost do this and is no extra labor. Not really a big deal
  • A secret little part of me wants to experiment with its language parser and switch begin/end to C style braces, and remove the := requirement or even try to make it compatible with VB6 functions and code.
All of my complaints are really just usability features, and literally things I can fix/implement on my own given that its open source. The language has all of the core attributes that I want, and is stable enough for use as is. Just want it more efficient to code and debug in.

The lure of no longer being tied to the Windows platform is also strong given their recent history of alienating developers and business users alike as they chase after tablet/mobile sales and try to turn everyone into java/html/js app developers.

There are also some language design issues I am not really keen on.

  • language is very structured, which is good and bad. you can just belt out code for small projects like you can in VB6. Every variable has to be declared, and declared at the top of a procedure in the var section. I really like declaring vars just before use
  • I used to really want the capability to define multiple classes in one file. this really makes sense for small placeholder classes that are used only for data storage. Defining multiple 30k classes in the same file however, not really on board with which this enables. Kind of a toss up as it comes to coding conventions but there is a dark side to this feature. I guess ultimately i am still on board with it. I dont like to have conventions overly defined for me.
  • The language is very tightly scoped. managing forward declarations is a little annoying. Makes you have to jump around your source file more to make a small change. Organized yes. In large projects helpful yes.
None of these things are deal breakers, but they do require more labor to implement code. I guess the bottom line is VB6 is almost perfect for what it is, and it can be stretched extremely well. Its also uber efficient and has all the right tools. Still not sure if Pascal is going to win me over for the work i do.

Comments: (3)

On 04.06.14 - 1:11pm winston potgieter wrote:
check out, it is pretty cool, coded in Lazarus, and much closer to vb6. They hope to create a vb6 project importer... I also am worried about the future of vb6, as I have 3 apps currently sold written in vb6.

On 04.06.14 - 2:31pm Dave wrote:
Cool I will check it out thanks. The first group who can pull off a seamless switch over will have an immediate following I am sure.

On 04.21.14 - 4:11am Dave wrote:
After about a month review, and submitting a couple patches to lazarus..Its a decent language, but still not as productive as VB6 to code in. (IDE, debugging, and language).

The couple added benefits such as x64 compile, 64 bit types and unsigned numbers arent a great enough draw to warrant learning all the nuances of a new language. Other barriers such as creating standard DLLs, or linking in C Obj files into VB6 executables, I was able to remove. I also dont care for the executable sizes. 68k vb6 dll vrs a 1mb pascal dll.

The one real remaining consideration left for me is the Linux support which is really cool, but I still dont use linux on a regular basis so moot.

VB6 + C where needed is still the winning combination for me. Being able to compile the C Obj files directly into VB is also a killer capability too.

Leave Comment:
Email: (not shown)
Message: (Required)
Math Question: 24 + 41 = ? followed by the letter: R 

About Me
More Blogs
Main Site
VB6 Console Apps
VB6 Debugger View As Hex tooltips
VB6 - C Share registry data
VB6 Addin Missing Menus
VB6 Class Init Params
VB6 isIn function
Python and VB6
Python pros and cons
download web Dir
vc rand in python
VB6 Language Enhancement
Register .NET as COM
UDT Tricks pt2
Remote Data Extraction
Collection Extender
VB6 FindResource
DirList Single Click
Reset CheckPoint VPN Policy
VB6 BSTR Oddities Explained
SafeArrays in C
BSTR and Variant in C++
Property let optional args
Misc Libs
Enum Named Pipes
Vb6 Collection in C++
VB6 Overloaded Methods
VB6 Syncronous Socket
Simple IPC
VB6 Auto Resize Form Elements
Mach3 Automation
Exit For in While
C# self register ocx
VB6 Class Method Pointers
JS Debugger
Duktape Debug Protocol
QtScript 4 VB
Vb6 Named Args
vb6 Addin Part 2
VB6 Addin vrs Toolbars
OpenFile Dialog MultiSelect
Duktape Example
DukTape JS
VB6 Unsigned
.Net version
TitleBar Height
.NET again
VB6 Self Register OCXs
Query Last 12 Mos
Progid from Interface ID
VB6 to C Array Examples
Human Readable Variant Type
ScriptBasic COM Integration
CodeView Addin
ScriptBasic - Part 2
Script Env
printf override
History Combo
Disable IE
API Hooking in VB6
Addin Hook Events
FastBuild Addin
VB6 MemoryWindow
Link C Obj Files into VB6
Vb6 Standard Dlls
CStr for Pascal
Lazarus Review
asprintf for VS
VB6 GlobalMultiUse
Scintilla in VB6
Dynamic Highlight
WinVerifyTrust, CryptMsgGetParam VB6
MS GLEE Graphing
printf for VB6
C# App Config
Tero DES C# Test
VC 2008 Bit Fields
Speed trap
C# Db Class Generator
VB6 vrs .NET (again)
FireFox Whois Extension
git and vb6
Code Additions
Compiled date to string
C# ListView Sorter
VB6 Wish List
C# Process Injection
C# PE Offset Calculator
VB6 Async Download
Show Desktop
coding philosophy
Code release
Dll Not Found in IDE
Advanced MSScript Control
random tip
Clipart / Vector Art
VB6 Callback from C#
Binary data from VB6 to C#
CSharp and MsScriptControl
HexDumper functions
Js Beautify From VB6 or C#
vb6 FormPos
Inline Asm w VB6
The .NET Fiasco
One rub on computers
Universal extractor