The string handling are much better than C. Most is just automatically. You would not even encounter any difficulties until you start to interface with C libraries. And then it is still easy.
Due to this and strong typing and bounds-checking you automatically avoid most memory errors that you get in C. But you can make it as complicated as C, with pointers to pointers to arrays, disable bounds-checking/type-checking, etc. There are some limited parametric type possibilities.
The disadvantage is the absence of closures/lambdas. Instead you have to make pointers to functions, like in C. Or use Objects like in Java. But with manual memory management.
The manual memory management and type declarations give extra overhead. Like in C. A lot would be avoided with inline variable declarations with automatic typing.
I would say Pascal's killer app today is Lazarus. An open source, multi platform GUI RAD IDE.
The syntax will be the primary barrier. Things like nested if-else with multiple conditionals are just a little more persnickity if you've been using C braces for decades. But the language, in the Borland dialects that most are using now, is somewhere in between C and C++ in terms of power overall: it's a little safer by default, still manual memory, but without needing to fling around quite so many pointers. And those compile times! A pretty well-suited language for game coding, actually.
And in terms of writing production code, libraries may or may not be a barrier. Basically, Pascal's current ecosystem exists in the shadow of one of the best RAD environments of the 90's - Delphi. That's where a lot of the code got written, and there's a definite focus on native desktop apps that remains. There are certainly good libraries available, but many are old, Delphi-centric, and lack polish - haphazard accumulations from developers that are very "get-er-done" and unconcerned about reuse. You can always bind C code, of course, but today it's easy to end up saying, "well, but I could just get a working library in (Go/Python/Node/etc) and be done" and thus end your Pascal journey before it starts.
The way primitive sets and enumerated types fit together is still a rarity, as far as I know. (You can accomplish the same things in any low-level language, but the pascal syntax make it really nice.)
Interfaces in pascal are fairly interesting because they allow you to implement your own addref/decref routines for automatic reference counting. This was made for COM, but you can plug it into whatever reference counting scheme you like (say if you want to write python extensions or whatever).
The main thing is still probably the component system though, and the tight integration with the development environment.
It's kind of a trip the first time you configure an IDE plugin and realize it just recompiled the whole IDE for you.
Free Pascal now has a new way for that, stack objects/record with custom init/cleanup code. Real RAII. But not if used with inheritance
Also what I really hate about Pascal is it is dishonest. It tells you it is very structured and your code will be better because of limited expressiveness. But then the 'writeln' 'function' needs to be intruduced at the compiler level - you cannot write such a function in the Pascal grammar. (maybe with freepascal you can nowadays)
What I liked though is that it didnt have the empty statement ';' so you really had to understand the semantics. Sometimes you were not allowed to end you statements with ';' (since they were ended by the block, so this would require the emptystatement). I think freepascal does not have this feature anymore (which is the thinking changing).
And just one more thing: Personally I would try to learn ADA before diving into Pascal.
Pascal has empty statements. They are exactly that - empty. In C syntax ; is a statement end token, so the empty statement is ‘;’. In Pascal ; is a statement separator token, so the empty statement is ‘’, and ‘;’ is two empty statements. So the typical error is to write “....... ;” where only one statement is syntactically allowed.
Example:
if x > y
then x := y ;
else ... Syntax error.
Only one statement allowed between then and else.
then { x := y ; }
else ... is Ok.
The blocking makes two statements into one.I'm not sure how FreePascal compares to Delphi in compilation speed, but I expect both are blazing fast. The compilation speed is a result of the language design of Pascal, and the fact that compilation can use a "single pass compiler". Go is another language that has this feature. Compilation times are so fast that development can feel similar to using an interpreted language.
It has the best possible ideas, and then fuck up the implementation.
Recently, I tried to use a set on a three valued enum. With three values it should have worked perfectly. But no, the set was not allowed. Because the values were -1, 0, 1 and FPC apparently only can create set on non-negative integers
Today, Delphi is used in some shops the same way C# or Java is used in others. Free Pascal with Lazarus is kind of like a free version of that. You can quickly build desktop apps.
Ada is nothing like that. It's almost exclusively used in the defense industry and others like aviation and infrastructure where the code is likely to be embedded and can NOT fail.
One is for standard business and one for critical infrastructure.
What do people use today? Java, C#, C, C++, Python, R, JavaScript, Php.
What might become popular someday? Rust.
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?