Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

111–120 of 235 posts

Re: Why I use Object Pascal

#111
post #12

Yeah I've written compilers for Swift, C#, Java, JavaScript and Pascal and agree Pascal is the cleanest and nicest language, both on the parsing side and writing in.

Pascal language has a LL(1) grammar, typical for Wirth and other 1980s work.

LL(1) grammars are of great practical interest, as parsers for these grammars are easy to construct, and many computer languages are designed to be LL(1) for this reason.

Re: Why I use Object Pascal

#112
post #107
post #100

Earlier quoted context omitted.

In those days without Internet and expensive dial-up access to BBS limited to 5 simultaneous users, it depended very much where in the globe we are talking about. On my area in Portugal, using C was mostly for university projects. For anything else we were using Turbo Pascal and Assembly, with Clipper for business applications. Actually many MS-DOS systems programming books had code listings in C, Pascal and Assembly…

A BBS with 5 simultaneous users? Sounds amazing. Most of the BBSes here in the Toronto area only had a single phone line. :)

Yep, at least they had 5 different numbers, but given the price of regional phone calls, I only used it a couple of times during a Summer job.

Re: Why I use Object Pascal

#113
post #59
post #14

In my university (in Paris) we used to learn programming that way for the licence degree 1st year -> pascal only 2nd year -> c only 3d year -> java only That was a very nice learning curve for the core course of programming.

For absolute beginners, I still think Pascal, or Turbo Pascal is best to start. It has a syntax that doesn't scare people away, and very readable. Deploying is also 1 trillion times easier then what ever we have today, ( C , Python , Ruby , Node.js ... ) I would have picked Ruby if it could compiled into a single executable file, and if the Dev environment actually work on Windows. P.S: It does work on Windows, but n…

At my university, we skipped Pascal and went straight to Modula 2. This was in the late 80's - early 90's.

Re: Why I use Object Pascal

#114
post #7

Earlier quoted context omitted.

In my experience (talking FreePascal/Lazarus here, as I'm on Linux most of the time), the library situation is not that bad, actually. The standard lib has most of the mundane stuff, and a little github-searching can often find a working version of more specific stuff (like SSH2 which I needed recently). To the contrary, in some areas (like GUI tooling) it is far far beyond newer alternatives like Go. Also, I think t…

We needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunCommand('curl',[' https://ifconfig.co' ],s, opt)` clutch with curl.exe(with licence file) bundled into my innosetup file... magic?!

FYI Free Pascal (and by extension, Lazarus) comes with fcl-web which contains, among others, an HTTP client.

See:

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

Re: Why I use Object Pascal

#115
How are the available packages? Is there a package management system ala `bundler` or `npm`?

This to me is a critical piece of adopting a language, especially a non-mainstream one. Pascal has the benefit of being older but access to clean modern libraries is critical.

Pascal looks like an excellent option for building cross-platform desktop apps, given the excellent GUI libraries. But I doubt I'm sold enough on it for any web stuff, given the great other options. I'd likely use OCaml if I was going to gamble on a non-mainstream language.

Re: Why I use Object Pascal

#116
My dad still runs his business on a software I wrote in 1998 in Delphi. I haven't touched it since then but it is the only code I have that still works 19 years later.

Re: Why I use Object Pascal

#117
post #111
post #12

Yeah I've written compilers for Swift, C#, Java, JavaScript and Pascal and agree Pascal is the cleanest and nicest language, both on the parsing side and writing in.

Pascal language has a LL(1) grammar, typical for Wirth and other 1980s work. LL(1) grammars are of great practical interest, as parsers for these grammars are easy to construct, and many computer languages are designed to be LL(1) for this reason.

I always hand write them but yeah. LL(1) is always nice

Re: Why I use Object Pascal

#118
post #7

Earlier quoted context omitted.

In my experience (talking FreePascal/Lazarus here, as I'm on Linux most of the time), the library situation is not that bad, actually. The standard lib has most of the mundane stuff, and a little github-searching can often find a working version of more specific stuff (like SSH2 which I needed recently). To the contrary, in some areas (like GUI tooling) it is far far beyond newer alternatives like Go. Also, I think t…

We needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunCommand('curl',[' https://ifconfig.co' ],s, opt)` clutch with curl.exe(with licence file) bundled into my innosetup file... magic?!

libcurl (with examples) is bundled in the FreePascal distribution, as well as simpler alternatives like fphttp, fphttpclient, fphttpwebclient, etc.

Re: Why I use Object Pascal

#119
I wrote the first version of Outlook Profiler in Delphi 6, then in Delphi 7. Wonderful introductory language for making products (although Perl was my first exposure). The VCL GUI library and IDE work so well together that things today are second rate. Strange that we've not improved this basic need.

Today, I write most things in C++ (or C# if I can).

Re: Why I use Object Pascal

#120

Earlier quoted context omitted.

My High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then. I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.

You've described my experience exactly. Once I got to learn C at university, I felt that I was now using a "grown up's programming language". It took a few years to realise that C's manual memory management and explicit pointer handling was making me much less productive as an application programmer.

It's not like Pascal's memory management and pointer situation was that much better.
Post reply on HN