Slashdot Mirror


Ask Slashdot: Is Pascal Underrated?

An anonymous reader writes In the recent Slashdot discussion on the D programming language, I was surprised to see criticisms of Pascal that were based on old information and outdated implementations. While I'm sure that, for example, Brian Kernighan's criticisms of Pascal were valid in 1981, things have moved on since then. Current Object Pascal largely addresses Kernighan's critique and also includes language features such as anonymous methods, reflection and attributes, class helpers, generics and more (see also Marco Cantu's recent Object Pascal presentation). Cross-platform development is fairly straightforward with Pascal. Delphi targets Windows, OS X, iOS and Android. Free Pascal targets many operating systems and architectures and Lazarus provides a Delphi-like IDE for Free Pascal. So what do you think? Is Pascal underrated?

11 of 492 comments (clear)

  1. Re:Discussion is outdated by Anonymous Coward · · Score: 5, Informative

    That. I couldn't care less if you replaced x = 1 for x := 1 or other simple syntax changes like that. The main thing is, nobody uses Pascal anymore, there's pretty much no useful libraries/frameworks/tooling and whatever else for it, little online resources for it, no jobs that need it and so on. This discussion is outdated by at least a decade. Pascal lost and it won't be back, end of story.

  2. Re:Modula-3 FTW! by Anonymous Coward · · Score: 5, Informative

    What can you do in Pascal that you can't do in C++, or Python, or Java?

    I would say that Delphi's advantages over Python and Java are native compilation and its advantage over C++ is the speed of compilation. For fast development of GUI applications (and cross platform these days) Delphi remains one of the best options available.

  3. Re:Discussion is outdated by Anonymous Coward · · Score: 2, Informative

    actually, I find what you say about: " there's pretty much no useful libraries/frameworks/tooling and whatever else for it, little online resources for it, no jobs that need it "

    to be FAR more true for C than Pascal. Pascal has Lazarus and Delphi IDE which you can make GUI applications effortlessly across many platforms, and it WORKS and they are far less buggy (compare this to KDE/QT, GTK1/2/3/4/5, XUL, or whatever the craptastic incomplete and buggy hipster "framework du jour" is this week. I use Pascal because I like to get shit DONE, not be some weiner endlessly arguing about how many angels fit on the head of a pin.

  4. Re:Discussion is outdated by Anonymous Coward · · Score: 2, Informative

    C is used extensively in embedded development and in tons of open source projects. There's countless job opportunities right there, locally. C++, C# and Java also have tons of opportunities, as well as tons of others on the web development side (PHP, Javascript and what not). There's no shortage of opportunities if you know those.

    As for Pascal, Delphi, Lazarus and such, I just don't see how they solve any problem better, they offer none of the tools I need, and there's literally *ZERO* jobs for it within 250km of where I live (I didn't search beyond that). For most of us it's just not an option.

  5. Re:Let's flip this around by Anonymous Coward · · Score: 2, Informative

    Well, Pascal brought structured programming to the masses. Now we use blocks, subroutines constrold structures (case statements, do-, while- and for-loops, etc) almost everywhere.

  6. Re:Modula-3 FTW! by SAN1701 · · Score: 5, Informative

    In my experience (about 20 years professionally working with Delphi, since the first version), the biggest advantage of Object Pascal over C++ is its strong typing discipline. It makes a program more maintainable on the long run, and errors are easier both to avoid and find. Pointer and String handling are also better in Pascal IMHO, and finally compilation time is also much shorter, which is not something to be disregarded when debugging a big project. Against Java or Python, desktop applications are usually more responsive with Object Pascal as it outputs machine code without JIT or GC involved (and usually Delphi will output a single .exe, without the need for any DLLs). Sure enough, you have to remember to destroy your objects, although newest versions of Delphi can use ARC on mobile platforms. My 2c. Sure I've already used all 3 (Python, C++ and Java) when I needed, but I've never felt as productive in any of these as I am in Object Pascal. So maybe the language has it's values.

  7. Re:Modula-3 FTW! by innocent_white_lamb · · Score: 3, Informative

    the structure of the program is easier to read in C.
     
    I agree, but with the proviso that the C indentation style is what you're used to reading and like to see.
     
    I personally am one of those weirdos that likes whitesmiths style since the functions and whatnot are well separated and program structure is easy to deduce by looking at the indentation.
     
    In fact, I use Artistic Style to convert any C code that I'm planning to study into whitesmiths style just to save my sanity.
     
    I keep meaning to learn to use cscope for this stuff, but somehow never quite get around to it.

    --
    If you're a zombie and you know it, bite your friend!
  8. Re:This. SO MUCH This. by Motard · · Score: 5, Informative

    I'm an old 50+ developer who has had to reinvent myself several times throughout my career. And while a lot of really good new developments for, um, developers have come our way, a lot of valuable things from the past have been lost. For instance, I continually cringe when needing to write SQL code within some other language. There was a time when database access was actually a fundamental part of the language. 4th generation languages, for instance, are largely forgotten - but they really were useful. Same goes for ISAM data access. It is insanely efficient compared to what we typically do today.

    Yes, SQL is great for some tasks, but most of that functionality is merely overhead for the sorts of common tasks and application has to perform on a daily basis. If I have the primary key to a table, it's wasteful to generate a query when I can just say 'get me this'.

    This is where NoSQL proponents might pipe in with new solutions. But those aren't usually good solutions for general purposes. I've seen too many over-normalized databases over the years, and talked to their proponents. They propagate an ideology of theory over practical considerations.

    The thing is though, Pascal excels (or can excel) at all of these things. I'm really referring to Delphi here. The component library available is huge and varied, By your choice it is 100% open source, or completely proprietary, or a mix. In fact, the only major problem I've ever had with Delphi is rebuilding your development environment on a new machine, because you've installed so many tools over the years.

    With Delphi, I could drop a terminal emulator on a form and have it working in five minutes. Or I could resort to in-line assembly language if needed. I could, off the top of my head, develop web apps in at least three totally different ways.

    I saw a comment further up the pages that asked why we need Pascal when we have C++, Java and Python. Well, seeing as how Pascal predated all of these, and will do everything those do, why do we need the newer languages?

    I really encourage younger developers to give it chance. You can install and use Lazarus for free. I feel that Delphi is better polished and reliable, But if you're really an open source advocate, then contribute to Lazarus and/or Free Pascal.

    Having had some experience with most of these other technologies, I think you might be surprised at how much you're missing.

  9. Re:Modula-3 FTW! by Motard · · Score: 4, Informative

    Mmmm. PASCAL was designed by Wirth as an introduction-to-programming instructional language. It was supposed to teach the logic, methodology and 'best practices' of programming as they were defined then.

    And it did.

    Then it got adopted as a production language ... and God knows why ...

    Oh, I don't know....maybe it represented the logic, methodology and best practices of programming

    and went through a few iterations to iron out the bugs and add some features and utilities that a serious production/development language would require (including, most importantly, killing that one shot compiler).

    And evolved into seriously great products like Turbo Pascal and Delphi.

    As a result it has very few strengths compared to purpose designed languages/environments

    It remains a great choice precisely because it isn't designed to a particular purpose, but is quite adaptable..

  10. Re:Modula-3 FTW! by waimate · · Score: 3, Informative

    +1 to parent. Strong typing raises compile-time errors that otherwise would end up as pernicious run-time bugs. That means less time debugging and more reliable software. It's the total opposite of the sort of hippie "oh man, just grow the data structure however you feel at the time" approach of Python.

  11. Pascal vs Wirth's newer languages by __aahgmr7717 · · Score: 4, Informative

    I am amazed that almost no one seems to be aware that Dr Wirth is 3 generations of software beyond his original Pascal.
    He also created Modula, then Oberon and is now working on Project Oberon using Oberon-7.
    The spin off company Oberon Microsystems created the framework BlackBox and a superset of Oberon called Component Pascal.
    Component Pascal is now maintained by the user community and is open source.
    http://blackboxframework.org/i...

    I don't especially like Pascal but I love Component Pascal!