
Lazarus, a great tool for writing desktop applications - sysrpl
http://www.getlazarus.org/learn/tutorials/introduction/
======
sysrpl
Q: If someone wants to make a scalable, stable and high performant desktop
application, why would someone choose Lazarus (Pascal) over let's say JavaFX
(Java) or otherwise?

A: Lazarus supports constructs such as generic programming with type
constraints, iterators and enumerators, user definable conversions, value
types with properties methods and events, extension methods, and more.

In the video you'll see many examples of applications all written with
Lazarus. They look fantastic, perform great, and they don't depend on a
runtime environment.

Additionally, Free Pascal, the language it uses, includes events and
properties, two core concepts important in creating desktop applications.

Properties are the nouns and adjectives which you place on objects or value
types (structs). They allow you to have descriptive words associated with your
types such as Color, Caption, and Width.

When you write:

Button.Color := Red;

The property setter is invoked causing code to execute invalidating the Button
and refreshing the area of the screen occupied by Button. This is different
than having a bunch of Button.SetColor(Red), Button.GetColor(),
Button.SetCaption(Text), and Button.GetCaption().

Without properties what's to say what nouns and verbs are important to the
state and presentation of an object or value type? You just have a bunch of
methods with nothing to distinguish them from properties as I've described.

Then there are methods, again something which Java is sorely missing. In Free
Pascal they are their own intrinsic type.

Using an example again:

Button.OnClick := LoadFile;

We've associated some notification on Button with a handler method. Now how
hard is that? Better yet, in Lazarus you can browse all the events an object
supports and double click it assign a handler. The Java method of inner
classes and interfaces results in a lot of unnecessary typing and code. It's
also antithetical to the concept of lambdas and closures, whereas in Lazarus
they fit perfectly.

