Recent

Author Topic: Why Freepascal (or any Pascal  (Read 4858 times)

davidslazarus1

  • Newbie
  • Posts: 1
Why Freepascal (or any Pascal
« on: June 25, 2020, 09:45:08 pm »
I am a complete neophyte to Pascal and Lazarus.  Why would anyone program in Pascal, given the plethora of other, more current open-source programming languages available out there?  What features does it have that those other languages do not?  As just one example, Julia.  What major corporations use it?  Thank you.

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Why Freepascal (or any Pascal
« Reply #1 on: June 25, 2020, 10:25:03 pm »
For me it is old habbit %) and getting support from the community.

Other reason is freeism because is software prices.

Other reason is software lifetime , I just checked this list:

https://en.wikipedia.org/wiki/Timeline_of_programming_languages


Every year coming by a new language but I am not sure about living time of any language...

Software languages aren't miracle and there is no easy way to every direction but I can find some solutions by one tool.
(Also I remember this quota: https://tr.pinterest.com/pin/359513982726432125/ )

Laksen

  • Hero Member
  • *****
  • Posts: 733
    • J-Software
Re: Why Freepascal (or any Pascal
« Reply #2 on: June 25, 2020, 10:37:28 pm »
Why not tell us what's important to you when you write programs and code and we could figure out if Object Pascal and Lazarus is a good fit for you?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Why Freepascal (or any Pascal
« Reply #3 on: June 25, 2020, 11:02:31 pm »
  As just one example, Julia.  What major corporations use it?  Thank you.

A significant part of the Fortune 500 have Delphi licenses, which is the same language as Lazarus. How many of them bought Julia licenses?

Some languages are news-darlings. Some are workhorses. Lazarus is a workhorse.

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Why Freepascal (or any Pascal
« Reply #4 on: June 26, 2020, 12:15:05 am »
I am a complete neophyte to Pascal and Lazarus.  Why would anyone program in Pascal, given the plethora of other, more current open-source programming languages available out there?  What features does it have that those other languages do not?  As just one example, Julia.  What major corporations use it?  Thank you.


What led you to look at FreePascal/Lazarus?

What type of development do you do?

What languages do you have experience with today?
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: Why Freepascal (or any Pascal
« Reply #5 on: June 26, 2020, 03:53:50 am »
@davidslazarus1

Programming languages are just language, not too important to me and I don't care what corporations are using it. What the development tool can do is the most important thing to me.

1. In the DOS era, I wrote myself a diskette bootsector virus removal tool using Pascal. It's not as hard as you though because Pascal allow users to call BIOS interrupt 13h.

2. When I was a teen, I used Pascal to build a simple PC Piano. Pascal allows us to direct access hardware ports, how about Julia?

3. I wrote a payroll program using Pascal, it can print the reports to a printer. Can Julia use printers?

4. I used FPC + Lazarus to build a small database GUI tray application program for my personal usage, can I use Julia to do it?

5. I use FPC + Lazarus to build OpenGL games, can I use Julia to do it?

6. I use FPC + Lazarus + LAMW to build some tools to run on my Android mobile phone, can I use Julia to do it?

7. Currently, I'm writing a tool to automatically fetch and save data from a website using Lazarus, can Julia do it?

If Julia can do all the things above, I will happy to learn and use it.
« Last Edit: June 26, 2020, 08:33:20 am by Handoko »

Thaddy

  • Hero Member
  • *****
  • Posts: 14363
  • Sensorship about opinions does not belong here.
Re: Why Freepascal (or any Pascal
« Reply #6 on: June 26, 2020, 07:28:56 am »
A lot of the really useful libraries for Julia are not written in Julia, but in C or C++.
Julia is not - fully - written in Julia.
(A bit like Python, that is also helpless on its own)
Most really useful Pascal libraries are written in Pascal itself, including the compiler.
If a compiler can be built using itself it shows confidence that its generic applicability is very high...

Also the Julia licensing is cumbersome: the core is MIT but the rest is GPLv2 which is too restrictive for commercial applications. FreePascal and Lazarus libraries are GPLv2+linker exception which takes away most issues for commercial applications (only the compiler and the Lazarus IDE are restricted GPL'ed)
« Last Edit: June 26, 2020, 07:33:36 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: Why Freepascal (or any Pascal
« Reply #7 on: June 26, 2020, 10:00:14 am »
A lot of the really useful libraries for Julia are not written in Julia, but in C or C++.

Then I will pick C/C++ over Julia if I have to choose between them.

ccrause

  • Hero Member
  • *****
  • Posts: 856
Re: Why Freepascal (or any Pascal
« Reply #8 on: June 26, 2020, 12:36:32 pm »
I am a complete neophyte to Pascal and Lazarus.  Why would anyone program in Pascal, given the plethora of other, more current open-source programming languages available out there?  What features does it have that those other languages do not?  As just one example, Julia.
Why anything?  One question when considering a language could be: is it Turing complete. According to Wiki most languages are, so that settles the argument of "language X can do A, can language Y do the same".  Of course implementing functionality A in a particular language may require some effort. 

Example 1 - Say someone is determined to use garbage collection in Pascal - a "feature" not supported by the compiler. But you can write classes with reference counting that automatically free itself when the instance's reference count reaches 0.  And no, I don't want garbage collection embedded in the language, it would be horrible to write anything useful in a microcontroller with say 128 bytes of RAM.

Example 2 - Let us consider a different type of task: solving a differential equation.  Very easy in Julia (and C/C++, Fortran, gPROMS, Matlab, R...), more difficult in Pascal because you have to find a user library that implements the functionality (e.g. this one), or grab a numerical text book and code it yourself (just like in Julia, except Julia has many contributors so chances are you will find an existing library).

Example 3 - Generating payroll information from a database - relatively easily accomplished in Pascal, can be done in Julia too.  Publish results as PDF or HTML? Yes for Pascal, not sure about Julia.  Run all this logic as CGI on a web server? Pascal - yes, Julia - not sure (well, I guess you can use C/C++ hiding behind a library...).

Quote
What major corporations use it?  Thank you.

I started using Borland Pascal and that lead to Delphi.  In the 80's and 90's Borland was pretty successful and made great tools.  When Delphi started moving toward .Net I got fed up with the bulky IDE and language extensions I didn't use.  Eventually switched to FPC/Lazarus even though I had a commercial license for Delphi 2008.  That said, I'm not up to date with commercial applications in Free Pascal/Lazarus.

My view is that choosing a language is pretty much a matter of chance, circumstance and personal preference (if you get paid to program the choice may not be yours anyway).  Pascal was the 3rd language I discovered at school (after BASIC and Logo) and the possibilities it unlocked pulled me in completely.  Over the years I've briefly dabbled in other languages (Modula2, Fortran, Matlab, C/C++) but never really encountered something that was impossible to do in Pascal.  The only motivation (for me) to look at other languages from time to time is to exploit specific libraries and code examples.

Since I'm a hobby programmer I don't have choices forced on me, I also don't have to wonder what fad language will make me look accomplished from a recruiter's perspective.

In the end I view programming languages in the same light as spoken languages - use whatever language you are best able to express yourself in.  Unless you get payed to do otherwise.  Of course you may not know this when starting with programming...

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Why Freepascal (or any Pascal
« Reply #9 on: June 26, 2020, 01:34:49 pm »
If a compiler can be built using itself it shows confidence that its generic applicability is very high...

I have reservations about using that as an argument. Back when Pascal was derided for having no standardised I/O facilities, and as such was considered to be virtually useless, it was still capable of compiling itself.

Same applies to languages like Lisp, Smalltalk etc., all of which are usually self-compiled but all of which have shortcomings when considered as candidate general-purpose languages.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Why Freepascal (or any Pascal
« Reply #10 on: June 26, 2020, 01:40:06 pm »
Why anything?  One question when considering a language could be: is it Turing complete. According to Wiki most languages are, so that settles the argument of "language X can do A, can language Y do the same".  Of course implementing functionality A in a particular language may require some effort. 

I have reservations about that. "Turing Complete" defines a category of languages which have sufficiently complete functionality that they can implement a Turing Machine, which comprises a single finite "black box" plus a single potentially-infinite "tape". But there are everyday problems which /can't/ be implemented by a Turing Machine, and as such just because a particular language is Turing Complete does not necessary make it a suitable implementation choice.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 14363
  • Sensorship about opinions does not belong here.
Re: Why Freepascal (or any Pascal
« Reply #11 on: June 26, 2020, 04:55:58 pm »
Nothing to do with Turing complete... except for its proof. (a.k.a. eat your own dogfood).
Brainfuck is also Turing complete... https://en.wikipedia.org/wiki/Brainfuck

Pascal is a different kind: it is readable for humans.
« Last Edit: June 26, 2020, 05:05:52 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Why Freepascal (or any Pascal
« Reply #12 on: June 26, 2020, 05:49:58 pm »
Well /yes/, but a lot of people- including some that really should know better- always insist that any language or architecture which is Turing Complete is usable for absolutely anything... when in actual fact there are things that a Turing Machine (as defined by Turing) quite simply can't realistically do.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Why Freepascal (or any Pascal
« Reply #13 on: June 26, 2020, 06:27:57 pm »
Well /yes/, but a lot of people- including some that really should know better- always insist that any language or architecture which is Turing Complete is usable for absolutely anything... when in actual fact there are things that a Turing Machine (as defined by Turing) quite simply can't realistically do.

MarkMLl
Actually, it's more like those people misunderstand what Turing complete means. If a language is Turing complete, it can be used to simulate any Turning machine (and gets all of its features). That's it. It doesn't talk about anything else outside it. In fact, it's so easy to make a Turing machine and even many Brainfuck implementations can generate code for many other languages apart from executing by itself shows how tiny it means compared to what actual programming language must provide.

Rainbow6

  • New Member
  • *
  • Posts: 25
Re: Why Freepascal (or any Pascal
« Reply #14 on: June 26, 2020, 07:46:35 pm »
I am a complete neophyte to Pascal and Lazarus.  Why would anyone program in Pascal, given the plethora of other, more current open-source programming languages available out there?

Why should anyone use any other programming language?
Why should anyone speak English since Italian was „invented“?

What features does it have that those other languages do not?  As just one example, Julia.  What major corporations use it?  Thank you.

FreePascal has Lazarus - which I would call a „killer feature“ - there are not many „Visual UI Designers“ for other languages out there - leaving Microsoft VS aside, which is not OS.

Yes - Lazarus is not the solution for everything and everyone - but it’s good in what it is doing, and I haven’t found many alternatives where I can quickly click and code some UI for Windows, Linux and Mac without coding the UI layout by hand.

And for Pascal - I personally prefer languages which are a bit verbose, because Code if more often read than written.

Daniel

 

TinyPortal © 2005-2018