My high school taught BASIC in 1981, but then I learned Pascal on my own because some of the nearby colleges were using it. When Turbo Pascal came out, my dad happened to read about it in the Wall Street Journal, and got me a copy for my birthday. I kept up with TP through version 5. I was dead certain that Pascal would displace C, and today, when I have to write in C, my programs are either Pascal-like, or wrong.
The structure of Pascal seemed to be inherently geared towards teaching fairly disciplined programming. Maybe that was the point. I think that Pascal has helped me be a better programmer.
>The structure of Pascal seemed to be inherently geared towards teaching fairly disciplined programming. Maybe that was the point. I think that Pascal has helped me be a better programmer.
Niklaus Wirth would be pleased to hear that, since he designed Pascal to be a teaching language. He intended students to learn on Pascal and then graduate to Modula-2 for serious projects.
I don't think Modula-2 ever really caught on, though.
FWIW, Modula-2 and Oberon had quite a following on the Amiga back in the day.
There were whole Public Domain disk collections that only consisted of programs done in those languages. Most notably the AMOK disks (Amiga Modula-2 and Oberon Klub).
I think those languages also didn't catch on was partly because they weren't part of any major OS development standard. On Unix or Linux, C was dominant, for historical and cultural reasons, and on Windows, although there was and is a small but vocal Pascal community, most developers are focused on Microsoft's own programming languages.
Pascal had a commercial ecosystem by the time Oberon came along.
And Oberon is austere where Pascal dialects grew all kinds of warts in the process of adding the features people asked for.
Wirth took away features in almost every iteration of developing his languages - you see this in almost every language he touched going back to the 60's and Algol-W.
It's been the guiding principle of most of his career to ruthlessly simplify.
The Oberon-07 language report is 17 pages.
Oberon takes more of an effort in following Wirth's mindset of addressing deficiencies by looking at how to make things simpler across the board (e.g. including for compiler writers) as opposed to the Pascal dialects which took the approach of addressing deficiencies by making things immediately easier for users to pick up, at the cost of additional complexity all over the place.
OK, you've piqued my curiosity. I followed a very similar path to your own, but I have ended up as a C programmer professionally, and I'm curious as to what differences you see in the two languages. To me, they are essentially the same, give or take some syntactical differences. Functions and structs, direct access to memory, no classes, etc etc etc.
Good question. And my answer comes with the caveat that I'm not a computer scientist, and could in fact have been wrong. I've made one or two bad bets. I also bet that programming wouldn't be much of a career.
With that said, it seemed in C that you were closer to the hardware implementation of what pointers do (for instance you could do arithmetic on pointers), making it easier to reference an int with something that was supposed to be a float, or something like that, and to generally make those kinds of memory violation and array bounds errors. Nothing like that was in the original conception of Pascal, because Pascal was supposed to be hardware independent.
I felt like letting your data structures be your program was a natural aspect of Pascal, but something you had to discipline yourself to do in C. Also, the parameter passing syntax for Pascal seemed more readable than all of those *'s and &'s. It could all have boiled down to me understanding Pascal syntax better than C syntax.
This was all based on the C of the early 80s. When I mentioned some of these things to a real C programmer later on, he said: There are compiler warnings for those things nowadays. My favorite language du jour is Python, but I use C when messing around with microcontrollers, so I've finally gotten used to it.
Hah :) I was expecting you to come back with something about typecasting, which Pascal, as conceived by Wirth, was determined to make as difficult as possible, if not flatout impossible. This limitation made writing performant software in standard Pascal quite difficult. Which is why most of the popular Pascal implementations provided extensions to make it possible to use Pascal for real problems. I'm thinking notably of MPW Pascal, which was used to write much of the system software for early Macs.
You guessed right. And after I made that pronouncement to myself about C, I kinda lost touch with the programming community, as Turbo Pascal and my programming skills got me through college and gradual school in physics. When I finally came back up for air, of course C had won out, but programming a graphical platform with a low level language seemed too hard, and I reverted to higher level tools such as HyperCard, Visual Basic, and today, Python.
This hide a non-obvious advantage: The language is more coherent/well designed/simple in principle. This have a cascade effect along the way.
2- Anything C could do, Pascal too. Even the old Apple OS was done in a dialect of pascal.
BTW, I use Delphi instead of MS C++. Not miss C++ at all
3- More sane type system.
4- A good string type!
5- More readable syntax
Some people will contest the pascal syntax is verbose.
Let's agree about that. However most syntax (with the exception of BEGIN/END) is useful. We can disagree if more/less verbosity is good/bad, but is NOT the point.
Is not just the verbosity, is the predictability and less-ambiguity of it. Even if the keywords were replaced to shorted ones (and clamp down on the verbosity) you will get something very-alike to python in spirit (+ static type system).
This come again from the "obvious" "Pascal compilers ARE fast". They are fast, because, the syntax/language is made to be fast. In fact, most pascal compilers are 1-pass compilers.
Is NOT a coincidence that this is the case: The creator of Pascal wrote one of the most influential papers about build your own compiler:
This is why most people agree is easier to program in a dialect of pascal (like Delphi or FreePascal) than in C/C++, for the same kind of tasks. The clarity that bring the syntax could be a part of it (some of us believe) but in the end is that the language is more coherent. Is similar to "python vs ruby" where one is more "magical" than the other.
C/C++/Perl/Javascript is more about "A millon ways, not well integrated, in how, maybe, depending on ???, to do stuff" versus Pascal/Python "A predictable, single/small ways to do stuff".
Probably, GO is a spiritual sucessor in this area, where fast-compile times are enabled (obviously, among other things) because the language is simpler. That make it in contrast with Rust.
This are some of the most superficial things. As like with any language, is better to spend some time using it to appreciate it more.
I use it (Delphi) when I was a noob, and I can do stuff that was impossible to me to do in C/C++ (ie: C++ is more complex for the same). Where I read how do anything with them was full walls of code/mess, in Delphi I found more simpler ways. Spoiled badly, because the VCL was absolutely superior than the mess that MCF mean to do windows applications. And the the database libraries round around the ADO, DAO, .NET DataSet and that other stuff people still believe are good ideas...
Ada put far more to the table. The main problem was the high cost, that made it out of reach for many.
This was a serious trouble with other good languages, like smalltalk.
ADA have a lot of the things modern C#/Java is doing now, with what GO, Eiffel and others give too.
Still suffer from the "ADA is mainly a costly commercial compiler", but anyway...
Modula, in the other hand, look great. Sadly not much
exposure of it, and Delphi take the whole "Pascal space" to itself
Delphi is amazing, but is the most tragic story of any language ever: Is like if the owners hate it with more passion than any.
Is like the Firefly show: Doomed by the studio, but the fans love it to death!
The structure of Pascal seemed to be inherently geared towards teaching fairly disciplined programming. Maybe that was the point. I think that Pascal has helped me be a better programmer.
Admittedly, I've always preferred "real programmers don't use" languages.
But my other early influence was Steve Ciarcia. Real programmers program with a soldering iron. ;-)