Forum > Suggestions

Subforum about converting libraries from other languages

(1/2) > >>

Kalaco:
I have been waiting for years for Lazarus to reach this stage and I am very, very impressed with, and thankful for, the work of the people involved.  I think they have done the world a great service through these efforts.  (See http://www.nvtech.com.au/Index/index-Project_Nicaea.html for an insight as to why work such as this is so important.)

On hearing the news about Lazarus 1.0 being issued, I spoke to one of my co-developers about converting the work we have done across to Free Pascal (Lazarus) and doing future work in this language and development environment as well as contributing wherever we could to this effort, either through our work or by donation.

His response was entirely negative.   One of his main reasons for not adopting Lazarus was that there was much more material in the way of existing applications and libraries in Java, C, Python and Visual Basic than there is for applications using a programming language with Pascal-like syntax.  He also pointed to the fact that Pascal programmers are a diminishing population and finding programmers in the future would be problematic.

I believe that, of all the programming languages, Pascal achieves the best compromise between rigour and ease of use.  Additionally, Free Pascal, as a compiled language, achieves speed and compactness comparable to C yet it is much easier for beginners, especially, to work in.  This means that applications written in this environment will run faster on lower-power machines; making them suitable for developing countries and for 1st world commerce in general.

As a way of countering the objections raised by my colleagues, I believe that there would be merit in encouraging investigation into ways by which it could be possible to take C, Java, Visual Basic and Python source code and convert it into Free Pascal.  Imagine for example, the effect of all of those various libraries being available to Free Pascal programmers.  Imagine also how much more simple the world would be if there were fewer programming languages without losing power or capabilities in the process.

For that reason, as a starting point, I would like to suggest that there be a separate section for discussion on this topic in this forum.  It would be interesting to see if we could start a project to convert the source code of these various languages into Free Pascal.  In doing this, there is every possibility, in some instances, of Free Pascal being found wanting.  When/if that should happen, suggestions could be made to the Free Pascal project to extend the language in order to cover any validated deficiency.

I'd be very grateful for the thoughts and opinions of the membership of this forum on this matter.

With best wishes to all

Kalaco

TurboRascal:
@Kalaco, your input is appreciated, but you should have posted it in the Suggestions subforum, not here in a sticky notification thread...

Ask:
TurboRascal: I agree. Topic split.

Kalaco: It usually works the other way around. First there is some discussion
(I'd suggest "Packages and Libraries" and "Third party" subforums).
Then, if enough interest exists, a separate subforum may be created.

marcov:

--- Quote from: Kalaco on September 15, 2012, 07:41:19 am --- His response was entirely negative.   One of his main reasons for not adopting Lazarus was that there was much more material in the way of existing applications and libraries in Java, C, Python and Visual Basic than there is for applications using a programming language with Pascal-like syntax. 

--- End quote ---

I think that is a bit of a knee jerk reaction. The fact that those languages are all used for different things (Java :serverside and only a bit on the desktop ERP clients, Python: serverside on *nix, VB Classic: desktop, but even more dying than Pascal is.) says enough. The main contender (C#) is even missing from the list.

That brings us to the strong points of Delphi/Lazarus : creating relative standalone clients (mostly for Database use), usually done by smaller companies.
Because these companies are small, they can't dictate deployment options (read: runtimes and -versions) to their customers, but have to accomodate.

Another big area is the so called small programming. Small inhouse utility apps. I can't walk into a customers IT or engineering department without finding a Delphi 6 or 7E license for that. Small DB apps,
often with hardware connectivity. (e.g. scanners). Not Java, not Python, not VB, but Delphi. nine times out of ten.  The zero deployment requirements and the easy and productive designer, combined with a lot of third party source is one of the main reasons.


--- Quote ---He also pointed to the fact that Pascal programmers are a diminishing population and finding programmers in the future would be problematic.

--- End quote ---

Another typical knee-jerk remark. While the first part is true,  the second IMHO is not. It is easier to turn a C++ programmer into a Delphi programmer than
moving a VB or Java programmer to something else. In my previous job we usually advertise for Java/C++ programmers with a certain relevant skillset. The C++
ones generally worked out better than the Java ones. Even after preselection. Of course they would whine about Delphi being the problem forever, but they would
get things done. Some even learned to like it :)


--- Quote ---As a way of countering the objections raised by my colleagues, I believe that there would be merit in encouraging investigation into ways by which it could be possible to take C, Java, Visual Basic and Python source code and convert it into Free Pascal.  Imagine for example, the effect of all of those various libraries being available to Free Pascal programmers.  Imagine also how much more simple the world would be if there were fewer programming languages without losing power or capabilities in the process.

--- End quote ---

FPC/Delphi can access plain C headers by only translating the headers (which can be done semi automated). It can interface COM/activeX controls too. (one of the avenues used to communicate between VB and VSC++), which can be used as a bridge to .NET and C++ libs.

Classic VB is mostly dead Python is irrelevant on Windows.

And no, general source to source code translation is hard, very hard.  Forget about it for most realistic scenarios.

 

Phil:

--- Quote from: marcov on September 16, 2012, 05:37:07 pm ---Python is irrelevant on Windows.

--- End quote ---

The many GIS professionals who use Python in their Windows work might differ with you on that. Whether they're using an open-source GIS like QGIS or SAGA on Windows:

http://www.qgis.org/pyqgis-cookbook/

http://sourceforge.net/apps/trac/saga-gis/wiki/The%20Philosophy%20of%20SAGA

Or the MS Office of the GIS world, ArcGIS:

http://video.esri.com/tag/12/python

One thing is common: Python. And not on the server either.

Python is often selected whenever a cross-platform scripting language is used. For example, the qooxdoo JavaScript framework's entire tool set is written in Python:

http://manual.qooxdoo.org/current/pages/tool/sdk_requirements.html

Again, desktop tools, not server tools.


It looks to me like the language landscape is diversifying. For example, within the last few months we've seen not one but two commercial tools that translate Object Pascal to JavaScript. And this week info emerged about RemObject's "Nougat" Pascal language, with extensions for working with the Objective-C runtime (notably following FPC's own ObjC extensions by about 2 years).

If true, why is this happening? I believe it's related to more general trends initiated with the introduction of the iPhone and the subsequent success of the App Store: rejuvenation of traditional compiled languages like Objective-C, a longtime niche language, and an interruption of the slow drift to .NET-ness. It might even track the larger platform shifts going on:

http://www.businessinsider.com/wintel-monopoly-2012-9


--- Quote from: marcov on September 16, 2012, 05:37:07 pm ---And no, general source to source code translation is hard, very hard.  Forget about it for most realistic scenarios.

--- End quote ---

Instead, focus on using multiple languages cooperatively, eg, Pascal with .NET or Python:

http://wiki.lazarus.freepascal.org/Using_Pascal_Libraries_with_.NET_and_Mono

http://wiki.lazarus.freepascal.org/Developing_Python_Modules_with_Pascal

Thanks.

-Phil

Navigation

[0] Message Index

[#] Next page

Go to full version