5 ms·
Do people code in Pascal still?! I remember it from years ago in high school and it seemed like it was already ancient then. Nothing against the language itsel
by moonshinefe 11y ago
Do people code in Pascal still?! I remember it from years ago in high school and it seemed like it was already ancient then.
Nothing against the language itself, it was straightforward and easy to learn on. Just surprised to see a new compiler for it coming out.
- PvsNP_ZA 11y agoIn South Africa, Pascal and Delphi are still taught in schools... In fact, the University of South Africa actually has about 2 Delphi semester modules also, along with C++. Some schools have switched over to Java, and most other universities have jumped onto the Java/.NET bandwagon. So in a nutshell, I think it's still pretty prevalent in 3rd world countries. It's not a bad starting language to introduce students to programming concepts, although I would prefer Python for a first language.
- pjmlp 11y agoI remember there used to exist a South African magazine about game development in Turbo/Free Pascal and Delphi. It is quite nice that those universities still teach it, as that way at least those students will learn that C and C++ aren't the only way of doing systems programming.
- lordfoom 11y agoPoint of fact: the RSA department of education removed Java as the language being taught, and replaced it with Delphi, despite objections (from some like myself). Here's an article: http://mybroadband.co.za/news/columns/89295-is-delphi-better-than-java-for-high-school.html http://mybroadband.co.za/news/columns/89295-is-delphi-better...
- baq 11y agoi'd say it's a good decision for everybody except perhaps hiring companies, and then i'm not sure about that either in the long run.
- nickpsecurity 11y agoI agree. When learning to program, one should first learn the mental activity oc solving problems with code. Then maybe learn all the boilerplate and BS associated with a language like Java. Pascal is simple enough that students can learn fundamentals first. Same with industrial BASIC. Both are like pseudocode. Many people are turned off to programming encountering Java, C++, etc because they think programming is inherently that difficult.
- ziotom78 11y agoI used it a few months ago to develop some HPC code for analyzing the timelines of a cosmological instrument (ESA Planck/LFI), and I was quite happy with the result. I even wrote a blog post about my experience (http://ziotom78.blogspot.fr/2015/01/lfi-data-analysis-with-fpc.html http://ziotom78.blogspot.fr/2015/01/lfi-data-analysis-with-f...).
- vrruiz 11y agoNice to read this. I also created a fpc wrapper for cfitsio, but never published it as I thought it would have a limited interest.
- TimJYoung 11y agoGreat blog post. One point, though: the reason that you got a segfault with your FillChar on the array isn't because you used a dynamic array instead of static array. Dynamic arrays are just like pointers in terms of how the compiler handles them (the element count is a negative offset from the actual start of the elements, and there are other things like reference counts there also). The reason you got the segfault is because FillChar operates directly on the passed variable. In other words, your FillChar zeroed out the first 4 bytes of the pointer (not good) and then kept right on zeroing out memory that didn't belong to it (definitely not good). The reason the: array[0] notation worked is because subscript references are equivalent to referencing the first element in the array like a variable. Therefore the FillChar started from there and properly filled the rest of the array.
- ziotom78 11y agoMany thanks for this clarification! I have added a link to your explanation at the end of my post.
- andreiv 11y agoThe firm where I currently work has a rather huge Delphi legacy software. You'd be surprised how much is still being "extracted" out of if. The more modern (and better built, but I'm biased, as I'm part of the team developing it) web app, which is meant to replace the Delphi one, has not had the same success. It's picking up momentum though...
- clouddrover 11y agoIf it's better built then why hasn't had the same success? What are your metrics for "better"? What does "more modern" mean exactly? I don't see that there's much value in pursuing design or implementation purity if the software isn't getting the same end user take-up.
- andreiv 11y agoThe Delphi app has been continuously "enriched" with features and special cases, based on direct feature requests for each client that requested one. This has lead to the case where there are several thousands switches which need to work together, in every combination possible. They don't always work, by the way. The new app has selected the more relevant use cases and could be better structured and implemented. Modern means primarily a cleaned up UI, but also the dynamic way of customizing the GUI (defined per JSON and capable of on the fly changes for individual users or groups of users, instead of hard-code and compiled or yet another flag stored in the DB). The clients are usually pleased with the web app but the project managers are a bit hesitant, due to the different installation process. The Delphi app has been sold/installed for well over 10-15 years and people are used to copying .exe files on a server. Copying files and .dll-s and tinkering with IIS seams to be less appealing... The need to go "online" has been the driving factor for the web app.
- clouddrover 11y agoIt smells like the web app still has that new car smell. I'd guess that the web app will go through the same process of enrichment. The web app will get the special cases and direct feature requests and will eventually arrive at a similar state as the old application for similar reasons, just in a different implementation.
- moonshinefe 11y agoSome good replies to my question here, thanks.
- pilif 11y agoIn the rare occasions where I still have to do something for Windows, I'm still using my old and trusty version of Delphi 2010. If I had to say anything about Pascal, I would say that it's very readable. Even with multi-years gaps between me having to work on this, it's very easy to re-familiarise myself with the code and it's very easy to understand what it's doing. This might be related to style and, as Delphi was my first real language I've learned waybackwhen in the mid-90ies, yes, I have made a mess with my Pascal too, but it feels like it's much harder to produce a mess than it is in any other language I've worked with so far. Of course this is all just a matter of taste - just giving my 5 cents.
- interfixus 11y ago"A new compiler" is a bit of a stretch. The Free Pascal project has been around for about 20 years.
- lmm 11y agoA major version bump suggests a compatibility-breaking change, which would surprise me at this stage in the language lifecycle.
- dejv 11y agoSure, there are not much new development, but there is still a lot of people working in it every day. I am one of those people, maintaining and developing big business system. You can find Pascal/Delphi projects everywhere: a lot of scientific instrumentation software has GUI written in Delphi, there are tons of business software, even big amount of machines has UI for their front panels written in this language. I think Delphi/Lazarus is still best software for writing small to medium sized desktop apps available.
- hsivonen 11y agoThe HTML spec migrated from a Python-based cross-reference generator (https://bitbucket.org/ms2ger/anolis/ https://bitbucket.org/ms2ger/anolis/) to a Pascal-based one (https://github.com/whatwg/wattsi https://github.com/whatwg/wattsi) recently.
- TimJYoung 11y agoWe've been in the Delphi/FP/Lazarus 3rd party tools market for 17 years, and are still going strong. Yes, it's become less-used over the years, but it doesn't have anything to do with the language not being up-to-date. It more has been due to issues with Delphi's parent company and pricing. We wrote 2 database engines and a web development IDE using Delphi (compiles Object Pascal to JS). You can use it for just about anything: low-level, high-level, servers, games, LOB applications, mobile, and you can't beat it for code structure. It's highly readable and maintainable, and the compilers/libraries/runtimes are very backwards-compatible, so you can be assured that your coding investment will continue to produce returns for many years. You'd be surprised how many LOB applications are out there that are written in Object Pascal.
- michaelbunny 11y agoYes. Pascal is used. That's definitely the case. In the end there are 3 tribes. freepascal, Delphi and the Elements Compiler (C#, Swift, Oxygene Language is Pascal). There are many more traditional Pascal environments too. Smartmobile (HTML 5 apps), XEROCODER (based on FPC) for Grid developments and an integration into Visual Studio Code ... FPC Version 3 is a huge step and a great one. While I personally admire all of the people's work I must confess the evolution of freepascal as well as the Lazarus IDE is exceptional.