Recent

Author Topic: How should I start? Object Pascal or Free Pascal?  (Read 441 times)

ethArek

  • Newbie
  • Posts: 1
How should I start? Object Pascal or Free Pascal?
« on: August 22, 2020, 03:40:47 pm »
Hi.

I'm a Node.js developer, but I want to start something new. Pascal (in IDE Turbo Pascal 7.0) was first programming language I learned and I liked it. So I wanted to start again. Honestly I thought that pascal is dead, but fortunately there is large community, I'm shocked :D

I wonder how should I start. I installed Lazarus and FPC. Should I start programming with Object Pascal or "normal" Pascal (Free Pascal?) is good enough?
Is Object Pascal for Pascal what C++ is for C or it's different?
Also - do anyone recommend any good tutorial?

Thanks :)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9088
  • FPC developer.
Re: How should I start? Object Pascal or Free Pascal?
« Reply #1 on: August 22, 2020, 04:01:45 pm »
Free Pascal has both the TP dialect, the TP object oriented extensions (in TP5+, e.g. unti objects) and the more Object Pascal of Delphi.

Lazarus are the more GUI parts of the Delphi compatibility (visual classes +IDE)

So it is all the same. You can start with Lazarus and program straight TP code.

Fred vS

  • Hero Member
  • *****
  • Posts: 2085
    • StrumPract is the musicians best friend
Re: How should I start? Object Pascal or Free Pascal?
« Reply #2 on: August 22, 2020, 04:10:21 pm »
Lazarus, that uses fpc, gives the LCL GUI widget-set that is compatible with the tenor widgetsets, like GTK, Qt, win32, carbon...

But you may also use "pure fpc" widget-set like:

fpGUI : https://github.com/graemeg/fpGUI/tree/maint

or
MSEgui: https://github.com/mse-org/mseide-msegui/

In that case, the look of your application will be exactly the same if you compile it for Windows, Linux, FreeBSD or MACOSX.
« Last Edit: August 22, 2020, 04:14:48 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Handoko

  • Hero Member
  • *****
  • Posts: 4080
  • My goal: build my own game engine using Lazarus
Re: How should I start? Object Pascal or Free Pascal?
« Reply #3 on: August 22, 2020, 04:12:26 pm »
Hello ethArek,
Welcome back to Pascal.

Pascal language is beautiful, so I won't dead. It may not be as popular as previously but there always users to keep it alive.

If you want to build GUI program, you may interested to try Lazarus. Lazarus is powerful IDE to build GUI applications. Basically, Lazarus is IDE + Free Pascal Compiler + GUI framework.

For simple/short programs using the old school procedural approach usually is easier. OOP paradigm is good for huge and complex projects, it requires proper planning. OOP begins harder but easier later when maintaining and improving. OOP or not is more about personal preference. A skilled programmer can use either OOP or traditional approach for the same project.

I recommend you start from here:
https://wiki.freepascal.org/Portal:New_Users

There you can find some basic things and a lot of tutorials which offers a wide range of topics, very useful for beginners.

Also, this (Free) Pascal reference guide is worth to be bookmarked:
http://freepascal.org/docs-html/current/ref/ref.html

Have fun.
« Last Edit: August 22, 2020, 04:14:53 pm by Handoko »

 

TinyPortal © 2005-2018