[Lazarus] Who is using Object Pascal in production?

Michael Van Canneyt michael at freepascal.org
Fri Oct 27 16:13:36 CEST 2017

On Fri, 27 Oct 2017, Marcos Douglas B. Santos via Lazarus wrote:

> On Fri, Oct 27, 2017 at 11:32 AM, Michael Van Canneyt via Lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> I use it almost exclusively on the server. Webservice, REST related stuff.
>> But there are many domains where Object Pascal still works very well.
> You've been doing a great job on fcl-web (thanks).
> I have REST services running on Windows IIS with FastCGI.
> I would like to ask you: Why not use Node.js, Go, or even Java?
> Is it just because you know more Pascal or, also, because you have
> some advantages using it on the server?

Where to start ?

Go is a very nice language, but is very difficult to get to work with 
external libraries. Writing imports can be next to impossible.
Our server needs to do LOTS of things that simply cannot be done in Go,
since Go doesn't have the necessary functionality (or libraries, or modules)
so we'd need to offload that to C libs, which kind of defeats the purpose.

Java would be a possibility, but

a) I don't know Java so well. Java is HUGE.

b) Then you need to deal with the Java VM and Tomcat and whatnot.
    Not pleasant. Recently we had a java service completely unresponsive for
    30 seconds, it was doing GC... Not acceptable at all.

Node.js is nice for some scripting, but IMO Javascript is not suitable for large
applications. Complete absence of type checking or any form of compilation
is a disaster for large projects.

Additionally, when using Node.js, you almost inevitably come into contact with npm.
We built some mobile apps using a web runtime, and typical usage for Node.js is 
packaging of the app. This typically uses npm.

npm pulled in 1200+ npm packages (100+mb), to pack an application of 1200 lines
of javascript. 
Not a joke. I actually checked. And to pack an application in essence means:
creating a zip. IMO the people using node.js and npm are deluded, to allow
such a mess.

Suffices that 1 of the 1200 packages for what reason whatsoever is broken,
retracted or whatnot: the whole system comes crashing down...

(The upcoming pas2js can target node.js, and I am confident you will not need npm.)

To make matters worse, javascript developers have no sense of time.
They actually think that completely breaking backwards compatibility after 2 years is OK.
For example, the change of Angular to Angular 2 (and subsequent changes) made me decide 
that Angular is unsuitable for development - despite all the nifty features.

The average lifetime of applications I make is many many years.
So, backwards compatibility is VERY important.

For all these reasons, I use Object Pascal. I can take my 10 year old
application, recompile, and be reasonably sure it will still work.


More information about the Lazarus mailing list