(Object) Pascal vs Go for GUI app

1,421 views
Skip to first unread message

Gour

unread,
Oct 11, 2015, 2:35:38 PM10/11/15
to golan...@googlegroups.com
Hello,

TL;DR: Any pro/cons of using Object Pascal (FPC/Lazarus) vs Go
(goxml/gxui/libui) for desktop app?

recently I investigating whether some of the Wirthian langauges can be
used for practical purposes of writing open-source multi-platform GUI
app by using x86_64 Linux as primary platform.

After some research I've concluded that Modula-2 is almost dead -
(buggy) m2c compiler/translator and GM2 single-handedly maintained,
practical no community, not much tooling support etc.

Oberon community is a little bit more alive, but not much choices with
compilers and no GUI options available.

Finally, there is good old (Object) Pascal with FPC compiler and
Lazarus...

Go is very actively developed, strong community, excellent (e.g Vim)
editor support, great tooling, lot of libs, but it seems it's not
(yet) established as language for writing GUI apps and I'm not sure
whether one of the above-mentioned GUI packages are production-quality.

Otoh, there is Lazarus which is great for writing multi-platform GUI
apps, but the (Object Pascal) language looks quite patchy in comparison
with Go which seems to be better designed with its simplicity - e.g.
Unicode support, String types, concurrency etc.

Let me say that I've already considered type-safe languages as well as
excluded languages like C(++)/Java/JS, so the final choise is to be made
betwen Go and (Object) Pascal.

Anyone familiar with both languages can provide some hints?

Any hint about recommended GUI package for Go is welcome as well...

Sincerely,
Gour

--
The working senses are superior to dull matter; mind is higher
than the senses; intelligence is still higher than the mind;
and he [the soul] is even higher than the intelligence.



Message has been deleted

Egon

unread,
Oct 11, 2015, 3:34:59 PM10/11/15
to golang-nuts
Note, my main language is Delphi, pretty much the same as Lazarus.

Lazarus/Delphi/Object Pascal have been around longer -- this means it just has a more full featured UI library.

So, pros/cons... Lazarus/Object Pascal has a production ready UI libraries. Go has bindings to Qt and some experimental libraries.

In the long term I suspect Go will surpass Lazarus/Delphi, but currently it is still significantly behind.

But, it depends what you want to build... the more you gain from the Lazarus feature set, the better it is. However if you are implementing something very custom (i.e. libraries don't exist) or something very simple, Go just might be sufficient.

Alternatively you can implement the UI in HTML/JS and let Go handle the backend... or even compile Go with GopherJS.

For list of libraries https://github.com/golang/go/wiki/projects#guis-and-widget-toolkits, AFAIK qml is one of the better pacakges there.

+ Egon

Gour

unread,
Oct 12, 2015, 2:06:48 PM10/12/15
to golan...@googlegroups.com
On Sun, 11 Oct 2015 12:34:58 -0700 (PDT)
Egon <egon...@gmail.com> wrote:

Hi Egon,

> Note, my main language is Delphi, pretty much the same as Lazarus.

:-)

> Lazarus/Delphi/Object Pascal have been around longer -- this means it
> just has a more full featured UI library.

That's certainly true.

> So, pros/cons... Lazarus/Object Pascal has a production ready UI
> libraries. Go has bindings to Qt and some experimental libraries.
>
> In the long term I suspect Go will surpass Lazarus/Delphi, but
> currently it is still significantly behind.

I was thinking more about it and I believe I'll choose to go with Go -
I like simplicity and design of the language, while Object Pascal looks
a but patchy, especially since always there is consideration of
backwards compatibility.

> But, it depends what you want to build... the more you gain from the
> Lazarus feature set, the better it is. However if you are
> implementing something very custom (i.e. libraries don't exist) or
> something very simple, Go just might be sufficient.

Correct, there are many packages available for Go - everything that I
need and, yes, I also have to implement lot of custom things. Otoh, with
the current momentum, I believe that GUI & GO will become more prominent
than it's today.


Thank you for sharing!


Sincerely,
Gour

--
Not by merely abstaining from work can one achieve freedom
from reaction, nor by renunciation alone can one attain perfection.


Kevin Powick

unread,
Oct 12, 2015, 9:37:36 PM10/12/15
to golang-nuts
Like Egon, I've done quite a bit of Delphi/Object Pascal/Lazarus work.  Actually, I wonder if I "know" him under a different name from one of the Delphi/Lazarus G+ groups or forums? ;)

I also agree with Egon about using Go on the back end and fronting your user interface with HTML/JS.  That's exactly what I've been doing for the past couple of years; converting many of our former Object Pascal desktop applications to browser-based interfaces driven by Go on the server.

The added bonus with such an approach is that, if done "right", your back end can power not only the browser, but any front end technology capable of consuming what are essentially "web services" (http/json/xml).  e.g. iOS, Android, etc, etc.

--
Kevin Powick

Gour

unread,
Oct 13, 2015, 3:54:12 AM10/13/15
to golan...@googlegroups.com
On Mon, 12 Oct 2015 18:37:36 -0700 (PDT)
Kevin Powick <kpo...@gmail.com> wrote:

> I also agree with Egon about using Go on the back end and fronting
> your user interface with HTML/JS. That's exactly what I've been
> doing for the past couple of years; converting many of our former
> Object Pascal desktop applications to browser-based interfaces driven
> by Go on the server.

I must say I'm not very enthusiastic about JS stuff, although I'm aware
that it provides easy multi-platform 'deployment'.

Another concern is about which widget set(s) you're using which can
replace 'desktop' app?


Sincerely,
Gour

--
As a blazing fire turns firewood to ashes, O Arjuna, so does the
fire of knowledge burn to ashes all reactions to material activities.


Manlio Perillo

unread,
Oct 13, 2015, 5:40:00 AM10/13/15
to golang-nuts


Il giorno martedì 13 ottobre 2015 03:37:36 UTC+2, Kevin Powick ha scritto:
Like Egon, I've done quite a bit of Delphi/Object Pascal/Lazarus work.  Actually, I wonder if I "know" him under a different name from one of the Delphi/Lazarus G+ groups or forums? ;)

I also agree with Egon about using Go on the back end and fronting your user interface with HTML/JS.  

An interesting language for the frontend is Elm.


Regards  Manlio
Reply all
Reply to author
Forward
0 new messages