Live data from Hacker News

Modern Pascal is still in the race (2022)

blog.synopse.info

1–10 of 160 posts

Re: Modern Pascal is still in the race (2022)

#3
post #2

Having to write C/AL to make a living, which is based on Pascal, I can safely say it shouldnt be in the race anymore...

Interesting take. Pascal is definitely a niche language but most of the community around FPC and Lazarus seems very positive and welcoming.

Would you mind expanding on why you feel this way? What Pascal do you use? Do you use Delphi or FPC/Lazarus? What don’t you like about the language (or your particular vendor implementation)?

Re: Modern Pascal is still in the race (2022)

#5
I used Delphi in the 90's and early 00's, and really loved how simple it was to create desktop applications. I tried to get back into Pascal via Lazarus a few years ago, but was just very turned off by Pascal itself. The conventions just differ so much from other more popular languages that I use for work now, and there just isn't the same level of stack overflow questions/answers to make it easy to pick up. I guess with ChatGPT, it should be a lot easier to pick up now, so maybe I should give it another go.

Re: Modern Pascal is still in the race (2022)

#6
This article reads more like an ad for mORMot 2 than Pascal. I've been out of the Pascal game for a few years, so I had to look up mORMot 2.[0] Apparently Synopse are the maintainers of it.

The article basically compare their CSV/JSON serialising library to Go's standard CSV/JSON libraries. Looking at the Go code, it's pretty clear why it has memory issues, it reads all the lines into a single object (well, `[][]string`) immediately, rather than reading line for line (which takes advantage of the stream).

I am not sure how this is remarkable and impressive for Pascal. They talk about how you don't need to use the `try..finally..Free` routine all the time, but that's only if the object in question is an interface. Interfaces are somehow handled by a reference counter in Object Pascal, so you need to know how to operate on objects vs interfaces, because they act very different. Pascal is full of these quirks.

[0] https://github.com/synopse/mORMot2

Re: Modern Pascal is still in the race (2022)

#7
post #3
post #2

Having to write C/AL to make a living, which is based on Pascal, I can safely say it shouldnt be in the race anymore...

Interesting take. Pascal is definitely a niche language but most of the community around FPC and Lazarus seems very positive and welcoming. Would you mind expanding on why you feel this way? What Pascal do you use? Do you use Delphi or FPC/Lazarus? What don’t you like about the language (or your particular vendor implementation)?

I have to say I wrote this as more of a joke as I do have no actual experience with Pascal. Looking at the syntax I just assumed it to be extremely similar to the language I have to work with on a daily basis. And with that, just as limited.

C/AL is a product of Microsoft and is only used in their ERP Software Navision. It's a horrible experience to work with as you don't have a lot of modern languages features just for the sake of readability.

At some point in the article the author wrote that Rust code isn't readable for example. I'd argue code shouldn't have to be readable by non-programmers. And especially not if the language sacrifices features like creating objects or dynamic arrays...

But as I wrote, I don't have actual experience with Pascal so maybe it's actually better.

Re: Modern Pascal is still in the race (2022)

#8
Hmm meh. I have a soft spot for Delphi/Object Pascal but I think the case here is not great. What it looks like at a glance is they wrote a better Pascal program than the Go one it was competing against, rather than just idiomatically port it. A fine approach, but it doesn't tell us that much. Specifically, it doesn't tell us very much about programming languages.

Go has plenty of weaknesses versus Pascal, but two commonalities of the languages are lightning fast compile times and a pretty good experience for modelling data structures. Pascal is undoubtedly lower level and does not guarantee memory safety, whereas Go does but its GC is often less efficient and more memory-heavy than manual allocation.

Blow for blow, though, I'd say the largest weak point for Pascal is a somewhat archaic syntax and for Go, honestly, the concurrency model. (Channels are nice, until they are not. I feel as though it's easier, though not necessarily easy, to write correct programs using mutexes than Go channels in many cases. This is weird, because nothing has changed about the old shared memory with locks model since it was the source of so many problems. Yet, programmers, computers and toolchains have changed a lot. Rust with locks is a great example.)

But the biggest problem for Pascal is the lack of a strong killer app. Back in the day, libraries like VCL made Delphi amazingly productive for desktop apps. But VCL/LCL doesn't really hold up as well these days, where desktop apps are less important and the important features of GUIs has shifted a lot. That leaves Delphi and Object Pascal as a sort-of also-ran: It's not that Go is especially good, in fact I'd argue its claim to fame and namesake (the concurrency model) just wound up being kind of ... bad. But, now that it's here and popular, there's little reason for e.g. Go developers to switch to Object Pascal, a less supported language with less of a job market, less library support, etc.

And that really is a shame, because it isn't really a reflection of Object Pascal being unfit for modern software development.

Post reply on HN