Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

We are actually using pascal for a very large project in healthcare (journal management). There is nothing wrong with the language, per se even though it is not the fanciest one.

Our codebase is one of the cleanest I have worked with, and it compiles very fast. We are using freepascal, and even though I would not use it for my hobby projects (which I try to do mostly in scheme or factor) I would say it is one of the more pleasant languages I have worked in.



sort by: page size:

I was just exploring Pascal last month. I've been meaning to do some more programming in it. I think it's a good compromise for someone who wants a lower level language but doesn't want to use C or C++. The FreePascal compiler also rips through thousands of lines of code a second so the compile times are really short

I work in a pascal shop. We use freepascal, which does the job really really well. Modern pascal, especially Delphi and the likes, are quite nice. Even moderate coders can, with a bit of planning, churn out good pascal code, which isnt my opinion about c++.

New hires whine in the beginning about the language of choice, but the generally don't take more than a week or two to get the basic gist of it. Our code is well structured, easy to extend, easy to understand and compiles fast.

I haven't worked on many other code bases this size, but I really don't see what could be much better.


That's a fair point. Pascal is no longer a commercially significant language. Still, I do run into solid little projects that are written in FreePascal from time to time. Sometimes not so little.

https://wiki.freepascal.org/Projects_using_Free_Pascal


My company has a multi-million-LOC application directed at medium to large healthcare providers written in FreePascal. I have worked with a lot of different codebases, and this is by far the best one. I would like to say it is because I have been the code dictator since it's inception, but it is probably because things are quite easy to structure using pascal.

What is so bad about Pascal? I never used it too much, but it seemed like a neat language.

Nothing wrong with Pascal though, it's probably much better to learn with than say C++ or Java.

Freepascal pretty much is the cleaned up version you describe. Fast, free, multiplatform, and just plain sensible. Overdue for a resurgence of use. Maybe the foundation in charge could rename it Cpascal and it would suddenly lift in popularity.

Pascal was a language I learnt in 1982 and love it for its elegance. The only thing i dislike and is still around its the begin... End and only because I'm a lazy typist and lazy reader.For me is hard to find Begin-end blocks... Harder than looking for stupid squiggles used in other languages. Go figure.


I’ve never had any direct experience with Pascal (though I remember my dad telling me a story of an assignment he had in college to write a queue of queues in Pascal).

From the perspective of the Alan Perlis quote “A language that doesn’t affect the way you think about programming is not worth knowing,” is it worth it for me to give FreePascal a try? Or if I have experience in other procedural languages have I pretty much seen what it has to offer already?


I have always used Pascal for those reasons, and fast compilation speed

FreePascal only does safe optimizations. (unless it has bugs where it does work at all)


Note for people who don't know much about FreePascal. It is a full-featured and very fast compiler. The resulting program is a rival for the best output of C/CPP compilers. It can be used in the style of simpler languages like Go and is almost as safe as Rust in a much faster manner. It has a great but old-looking IDE, Lazarus. It has been under active development for decades and is used for proper projects like:

https://dadroit.com/ https://peazip.github.io/ https://cudatext.github.io/ https://lazpaint.github.io/

As far as I know, there is no toolkit out there that lets you make fine looking applications for multiple platforms with proper speed.

The old Pascal you may know is not the new Pascal. The development of Pascal is mostly focused on ease of development while maintaining low-level programming and backward compatibility. It looks old on its face, but it is young at heart.

I recommend starting with Lazarus, https://www.lazarus-ide.org, a much lighter IDE compared to so-called light projects like VSCode, with many more features and components to play with.

Friendly word: don't let the comments with outdated information make you miss a great and fun tool.


Both of those are still pretty nice to work with and I'd say can still be used for a variety of different pieces of software! They also have a Software Gallery page that shows a few different programs developed with them: https://wiki.freepascal.org/Projects_using_Free_Pascal

Though the language is also showing its age and perhaps isn't for everyone, like how C++ might also be an acquired taste. Some things like talking to RabbitMQ, Redis, gRPC, GraphQL or MongoDB (just as examples) might be a bit more difficult than in other languages that get more love.


"Pascal is a "hidden" gem in the area of languages"

I agree. Programmers won't look at it because they perceive it to be old and out-of-date. But the language hasn't stood still. It's a fast, low-memory language. FreePascal with the Lazarus IDE is one of the best cross-platform development toolkits for building native desktop apps.

Sadly a lot of programmers can never see beyond the verbose (but readable) syntax.


Pascal, in general, was an amazing language. Simple to understand, compiled to native code - honestly the only complaint you could now (with FreePascal) make about the language is that it is a little "wordy."

Much the same as D - which was my initial thought when I read "friendly C." We already have a friendly C.


Pascal is an interesting language choice. I think it is the 1st time I see an open source project that is actually used in production written in Pascal.

Why would one choose Pascal as a basis for a new development ? I ask the question in a fair way and as someone who has written a lot of code in TurboPascal ages ago (and enjoyed it enormously). I wonder what it feels to develop production code with Pascal compared to say Java or Python. From those days, I remember the speed of the compiler (but my projects were not big) and the clean language.

"There has to be a more efficient way of writing cross-platform code"

Yes, it's called Freepascal using the Lazarus IDE. Native, cross-platform self-contained binaries that run fast and don't using oodles of memory or require massively-sized binaries.

Why is it not more widely used? Because of that word Pascal. That's enough to dismiss it in the minds of many developers. Modern Pascal has many of the features we associate with modern languages e.g OOP and generics. But Pascal's syntax, age and verbosity mean many developers will never give it a second look.


Could you refer me to a good introduction-intermediate level resource to learn modern Pascal? I currently work on my projects in C (quite fluent) and am constantly looking for a language that offers proper type safety, generics and a good module system without being overly complex (eg, C++). Pascal and Object Pascal seem like a really good fit but I can't get my hands on a high quality walk-through of the language implemented by FreePascal and its standard library.

I use Pascal for all my projects because it has memory safe strings and arrays.

Almost all buffer overflows and security bugs could be solved by rewriting all software in Pascal.

Everytime a software crashes, you should say, it crashed, because it was not written in Pascal

I just spend two hours modifying my xml parser to load files that have a doctype with inline declarations. Never needed to load an xml file with a doctype before, and I only wrote the parser for the files I have. I also have plans for a json parser. There is a surprising lack of Pascal libraries.


It seems like the "modern" way to write Pascal would be with FreePascal ( https://www.freepascal.org/ ) and the Lazarus IDE ( https://www.lazarus-ide.org/ ) both of which seem like stable, open and capable projects.

That said, i'm afraid that modern Pascal isn't awfully popular, which hurts its practicality a bit (e.g. learning about it, finding tutorials and others' experience with it, getting help). However, it's approach to native GUI development is pretty good, the language itself seems pretty okay and the compilation times are generally pretty good, as is performance ( https://benchmarksgame-team.pages.debian.net/benchmarksgame/... ).

Perhaps the only actual dealbreaker i can think of, is the fact that it doesn't have that many stable or even first party web development frameworks/libraries ( the closest i've found to that being https://wiki.freepascal.org/fpWeb_Tutorial and https://wiki.freepascal.org/fcl-web ), however they don't seem to be as popular as the "de facto" frameworks of the other languages. For example, Java has Spring (and Spring Boot), Node has Express, Python has Django (or even Flask), Ruby has Rails, .NET Core has ASP.NET Core, which are all widely supported and well documented, with plenty of tutorials.

Of course, that has only been my limited experience, since i mostly work with the other alternatives at my workplace and only dabble in Pascal occasionally in my free time. Would anyone care to comment on their experience with modern Pascal as well?

next

Legal | privacy