[Lazarus] Why the Java became so strong?

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Feb 25 23:29:41 CET 2012


2012/2/25 Frank Church :
> who ask themselves "If I am starting a new project, is Pascal the right one?
> Of course not!"

I don't get that... why not? Pascal (or rather Object Pascal) is a
brilliant language. It is easy to read and understand - even by
non-Pascal developers (just like I can read and understand Java -
thought I don't work commercially with Java projects).

Also, using the right tools and frameworks with Free Pascal, you can
create incredible applications in a very short time. Case in point...
Our company needed a bug tracking tool, with some special features. We
reviewed quite a few - nothing to our liking. In the end I said... "I
had enough of reviews and wasting my time, I can build us something in
a shorter period it took us to review all the other choices." I made
this a challenge. I jotted down the basic requirements that we would
need to make a bug tracker usable for us. I started from scratch,
using FPC as compiler. Lazarus IDE as my editor, fpGUI as our UI
toolkit, and tiOPF as our persistence / database laye, and tiSQLEditor
to help me produce boiler plate code for tiOPF. 4 Hours later we had a
working product that did everything we required! Another hour later,
the database was loaded with all our existing bug reports, feature
requests, attachments like images, sound clips etc.

I would love to see somebody else do similar with other languages.

Object Pascal is a very powerful language - just like C/C++, Java etc.
I can create full blown GUI desktop app, CGI web apps, console apps
etc. All with low system requirements, stand-alone executables (no
runtime environments required) etc. Anything you can develop in
another language, you CAN do in Object Pascal. I am very productive
using Object Pascal, and I am pretty sure there are many others that
can say the same.


> In relation to Eclipse above, The minimum 2Gb or even 4Gb or RAM needed to
> run Eclipse is not much these days.

I still think that is crazy!!! [I don't care how cheap RAM has become]
MSEide loaded with a large project, and after heavy use and debug
sessions, uses a mere 30-60Mb RAM. And no, I don't believe MSEide and
Eclipse are in the same league - I'm just pointing out the HUGE RAM
usage difference (bloat in Eclipse)! But then, we all know that even a
Java "hello world" app is memory hungry.

If you really want to compare Java vs Java, then compare Eclipse to
IntelliJ IDEA. The latter uses a fraction of the memory that Eclipse
requires - and it is much faster too.

> With Pascal I have to repeatedly
> compile to track them down.

Often it is also because most Pascal compilers are so damn fast! You
don't need to waist development time to make the IDE guess any syntax
errors while you type. Simply let the compiler tell you - because it
can compile a project is seconds. Delphi is a case in point.


> How about the reluctance to put documentation in library code?

Have you ever seen Object Pascal code that is well documented, and
that uses inline documentation (docs inside the source code units)???
The documentation obfuscates the code so much, it is damn hard to read
the actual code. We had this problem with tiOPF, and since moved to
fpdoc style documentation.

The other problem of inline documentation in Object Pascal, is due to
the Object Pascal syntax. Java, C# etc don't have interface sections
and implementation sections. So having to document a method of a class
in Java or C#, only has one location. In Object Pascal you have two
locations to think of.

I'm sorry, but seeing it for my own eyes, I MUCH prefer having the
documentation separated from the source code. All you need is a easy
to use documentation generator (we have fpdoc) and maybe some IDE
integration (Lazarus does, by being able to read the XML documentation
files directly), and you have no problems at all with separated
documentation.

NOTE:
When I say "documentation", I don't mean a one liner summary, I mean
clear documentation with at least 3+ paragraphs minimum for every
procedure, function or identifier. Such long text do not belong mixed
up inside Object Pascal source code!


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list