Slashdot Mirror


Free Pascal 2.0 Released

Eugenia writes "After five years of development, Free Pascal 2.0 is ready and it includes support for many architectures and OSes. It now has threading support, interfaces, widestring and better Delphi support among many other new features. OSNews posted an article introducing the updated GPL compiler." petermgreen adds a list of some of the major changes since the last stable release: "Much better support for Delphi language features (especailly method pointers); more supported CPUs (AMD64, SPARC, PPC (32 bit), ARM) and platforms (Mac OS classic, Mac OS X, MorphOS, Novell Netware); a new and better structured Unix RTL Threading support; and a large number of internal changes including rewriting large parts of the compiler to make it more maintainable and easier to port to new architectures," and notes that "Visual parts of Delphi are being handled by a seperate project known as lazarus, which has not yet reached 1.0 but should do so fairly soon."

17 of 451 comments (clear)

  1. Out of curiousity... by winkydink · · Score: 5, Insightful

    and not meant in a trollish way, but what is Pascal used for these days? What are it's inherent advantages over other languages?

    --

    "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    1. Re:Out of curiousity... by NetNifty · · Score: 5, Insightful

      First things that come to mind are prototyping and education - I'm sure I'm not the only /.er who was taught Pascal at school.

    2. Re:Out of curiousity... by rainman_bc · · Score: 4, Insightful

      Well it's got the strength of C and the readability of Delphi.

      Might not be as many job opportunities out there for a Free Pascal programmer, but for some who want to walk down memory lane...

      --
      09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
    3. Re:Out of curiousity... by KiloByte · · Score: 4, Insightful

      Exactly, Pascal is a lot, lot better when it comes to writing correct code. It's faster to hack around in C, Perl or Python, but when it comes to debugging, you can't really beat Pascal.

      Too bad, the lack of support killed it. The ISO version was absolutely unusable, as described in many essays ("Pascal considered harmful", etc). Turbo Pascal was a powerful tool, but it's lost in the mists of the past now.

      GPC can't be considered anything but sabotage (its developers intentionally break things like record types and stick with the broken ISO "standard"), and Delphi went into an insane streak of badly-designed hacks.

      Pascal is probably the best language for learning algorithms theory, too. Unfortunately, I would say that it's too late to try to revive it. There is too much C code to make the switch worthwhile to a language that is pretty much an equivalent of C.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    4. Re:Out of curiousity... by SAN1701 · · Score: 5, Informative
      First, I have to say I'm a big fan of Delphi. I've done dozens of projects with it in the last 10 years.

      Yes, I do use C++/Objective-C (when I have to program in OS-X with the Cocoa framework), and C# and Java. The productive gap I fell between the two first C-like languages is that, in Delphi, the work is done in a tenth of the time, specially for GUI and Database-enabled apps. When compared with Java and C# I would say that the time spent is twice or three times lower in Delphi.

      Of course, the fact that I develop mostly in Delphi makes easier to me to be productive in this language. But I have a friend who went to work in a full-Java environment, being good at it to the point of being a lecturer, and he agree that the Java world is still way behind when it comes to RAD.

      Having said all of this, many windows applications are built in Delphi. Here's a list of only the most famous.

      Delphi is generally considered the best tool for development in Windows. Simply put, its strengths are:

      1. Complete OO language, including real properties that were now copied by C# (actually, chief architect of Delphi-1 and 2, Anders Heijlsberg, is doing the same role in MS for C#).
      2. Easy to use IDE.
      3. Targets Win32, .NET (and Linux if you use Kylix, which was somewhat abandoned by Borland).
      4. A complete and mature framework, the VCL, with thousands of free components available on the web.
      5. Compiled code (when in Win32), which generates executables comparable in speed to those in C++.
      So why isn't it more widely used? I would say that one thing is because of Borland is a tiny company when compared to MS or Sun. The other is that it is a proprietary tool. And the third, generally the most commented, is that Borland maybe didn't know how to sell it properly.
    5. Re:Out of curiousity... by Siener · · Score: 4, Insightful

      First, I have to say I'm a big fan of Delphi. I've done dozens of projects with it in the last 10 years.

      I'm a big fan of Delphi too. I have experience in using lots of other development environments for Windows, and Delphi is simply THE best possible tool for Windows development - especially if you are working in a big development team.

      I really believe that once a programmer knows the ins/outs of Object Pascal (the language used by Delphi) he/she can be more productive than in any other language for Windows. Unfortunately many developers never get to that stage. This is of course a problem not exclusive to Delphi - It seems like in many courses for "Visual" languages all the time is spent on learning how to make nice looking forms, and not enough on the core language and proper OO programming - be it Basic, c# or whatever - but I digress.

      Another interesting fact - Java may look like C++, but if you look a bit deeper it has a lot more in common with Object Pascal. E.g. All objects are references, there is a single base class from which all other classes are derived etc. I've seen that because of this it's much easier for a Delphi developer to become a good Java developer than it is for a C++ developer to become one. A new syntax is easy to learn - a new programming philosophy is harder.

      The only reason that the use of Delphi has not become more common seems to be Borland's bad marketing. I once read a editorial in a Delphi magazine where the editor lamented about this. His conclusion was something like this: "It seems that Borland decided let's develop the best tool out there for Windows development, and then keep it a secret"

  2. Question by Anonymous Coward · · Score: 4, Funny

    If you didn't see the first version, will you be able to follow the plot?

  3. Ahh Pascal by CajunArson · · Score: 4, Interesting

    I still have fond memories of screwing around with Turbo Pascal on those (even at the time) ancient IBM floppy-PC things we were stuck with in high school. At the time Java was still called Oak, and many PC's would not be happy with even a C compiler for speed. Pascal was a major step up in power and performance from the BASIC we had done, and even though I've forgotten most of it, I did learn one lesson I still use today: useDescriptiveVariableNamesPlease (Ok, a little extreme, but I can't remember the last time I used 'x' as a variable name... joy)

    --
    AntiFA: An abbreviation for Anti First Amendment.
  4. missed opportunity by Anonymous Coward · · Score: 4, Interesting
    I'm glad to see a FREE pascal compiler available. Having used earliere versions of Free Pascal, I can say it's high quality.

    However, I wish the FP (and I don't mean first post) people and the GCC people would settle their pissing match. GCC is supposed to be "GNU Compiler Collection". When FP asked for information to help integrate FP as a GCC backend, they were told to fuck off. Talk about dickheads :(

  5. Pascal by FidelCatsro · · Score: 4, Interesting

    I always enjoyed debuggin pascal(enjoyment compared to debugging other code) because it naturaly promotes clean codding which is why to this day in germany it is used as a teaching language.
    Its good to have freepascal now supporting so many system as most of my personal system are now powerpc based .
    Pascal often takes alot of slack for being a toy language or a mear teaching language but it is certainly more than that and can be used to achive great results.
    Personly most of my compiled programing is done in C though i would definantly prefer pascal from a debuging stand point , the support just hasn't been there for the systems i use untill now.
    Great news though and i wish the freepascal team all the best

    --
    The only things certain in war are Propaganda and Death. You can never be sure which is which though
  6. SmartEiffel, Oberon by cahiha · · Score: 5, Interesting

    If you want a Pascal-derived language that's a little more up-to-date, consider SmartEiffel or Oberon (search on Google). Both have garbage collection, object-oriented features, and both can generate small, stand-alone executables. The SmartEiffel compiler is particularly neat, since it does global program optimization.

  7. Re:awesome by Nutria · · Score: 4, Insightful

    what would be a good reason to choose Pascal over any other given language?

    Since it's a B&D language, you won't get buffer overflow bugs & exploits. (In and of itself, that's a mighty good reason to use Anything But C.)

    Since it (well, Turbo Pascal did, so I guess Delphi does, too) knows how long strings are, there's no need for that silly necessity for null-term strings, and all the consequent bugs.

    But... since it's a B&D language, there will be other gotchas to struggle with.

    --
    "I don't know, therefore Aliens" Wafflebox1
  8. Why bother? by cruachan · · Score: 4, Interesting

    Must admit I cannot see the point of this. As many point out, Pascal doesn't really exist any more as a real-world programming language outside Borland's Delphi. Delphi may be a minority taste these days, but it's still, for my money, the best (fastest development time, minimum debugging time) environment available. The Pascal language as extended in Delphi is as powerful (well 99%) as C++ and easier to handle - but it bears little resemblence to the original Pascal beyond core language syntax and structure.

    It is getting a little long in the tooth now, but this can be a real advantage. There's literally thousands of free, shareware and commercial add-on components for it, with several sites indexing them, numerous 'fan' sites on many obscure and not-so-obscure aspects of the system. Borland latest version - Delphi 2005 - can also target .net - so there's life in the product line yet.

    All-in-all of which make continuing to develop in Delphi a very viable option. However all the advantages of Delphi do not apply to Free Pascal, which leaves it as a bit of a curiosity.

    I wish the project well etc. but I really can't see, as a regular Delphi user for 10 years, why I , or anyone else, would want to use it.

  9. Education by jd · · Score: 5, Insightful
    Pascal is one of the best educational programming languages out there. C is much more powerful, but is also much more lax - you can get away with really lousy coding and it often works. Ada is too cumbersome to have any practical educational value. COBOL should be taken away from academics, along with any sharp objects.


    Pascal offers a good balance, forcing you to think about what you are doing, not merely how you are going to go about doing it. A lax style is often picked out by the compiler, and errors are often easier to see and correct.


    The greatest advantage of Pascal, though, is that it is NOT used much in the workplace. This may seem odd, for something you're going to teach with, but think about it. It means that most people will be starting off fresh, rather than with bad habits, and means that you are learning about programming, rather than learning about some specific job. Jobs come and go, but software engineering will always be there.


    Learning a skill for a specific job is only useful as long as that job is around. For example, if you learn Visual Basic today, you're market fodder if those jobs run dry by the .NET and C# rush that is going on. If you learn .NET and C#, you're dead in the water when the next rush comes along. You need to know what lies behind the skills, the generic stuff, because you can transfer those skills any time you like. A good coder can always pick up new languages. I know something like 20. But if you're locked into a language, you've got to learn anything new from scratch. You've nothing to build in.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  10. Sometimes B&D is good ! by anti-NAT · · Score: 4, Informative

    I did a whole lot of programming in pascal as a hobby many years ago, after moving from it in Basic. Since that time, I've learned C, although I haven't done anywhere near as much programming in it, partly because I lost interest in programming in general - I've found a few other IT related things that have interested me more eg., networking.

    I like C a lot, as it allows you to break a lot of "general" programming the rules. However, I think it is a terrible language to learn programming in, because it doesn't enforce general programming rules that should normally be followed, unlike pascal.

    After you've learnt the rules of programming in a language such as Pascal, you can usually break the rules in C relatively safely, because you realise when you're stepping across the line, can work out what the consequences will be, and how to do it safely.

    Of course, you're still being a bit naughtly, and, the D you deserve will need to be sort from some other source than the programming language you're using :-)

    --
    The Internet's nature is peer to peer - 20050301_cs_profs.pdf
  11. Hysterical Rasins by DragonHawk · · Score: 4, Informative

    I'll try and answer some of your questions, or at least shed some light on them. A lot of this really comes down to "historical reasons" -- it was created that way 30+ years ago, and so we're still stuck with it today. Kinda like the "creat()" function in C/Unix. :-)

    "...randomly placing components around a window makes it hard to group and line up things..."

    I think they expect you to use the alignment tools to fix that up. Like you say, Windoze background. The idea of having software arrange your widgets/controls for you is too foreign.

    "...every expression is terminated with a semi-colon, like C, except for the last one in a code-block, which is optiona."

    Not quite. In C, semicolons are, indeed, statement terminators. In Pascal, they
    are statement separators. That's why you see the behavior you do. For better or worse.

    Like you, I took to putting semicolons at the end of most things. I solved the IF problem by using BEGIN/END blocks nearly everywhere. It can be argued that is the right way to go in the long term anyway. Remember, Pascal is designed to encourage good programing practices, and sometimes that increases the short term effort required. Sure, newer languages like Python do a better job, but building Python on the hardware of 30 years ago wouldn't be practical.

    "Furthermore, blocks start with 'begin', and end with 'end'. That's alot of characters to type... "

    That's why God invented macros. :)

    "Finally, a unit is split up in sections like 'interface', 'implementation'."

    Turbo Pascal (the ancestor to Delphi and Object Pascal) created units as a way to easily define libraries. You created an "interface", which was the published API for the library -- kinda like a C header file. The "implementation" was the code (like the .c file for a .h file). It provided a form of encapsulation. If you were distributing a unit, you could distribute just the "interface" part and others could still use the unit.

    "Why aren't these simply blocks?"

    Mainly because they function at a higher level then the normal lexical scopes that BEGIN/END define. In particular, you can define globals that are part of the implementation only, or are also published in the interface.

    "And why is the unit itself some sort of half block terminated with 'end.'"

    A Pascal program begins with "PROGRAM Foo" and ends with "END."; the Unit syntax just follows suit. No BEGIN was used for the global scope. I expect it's mainly because the "PROGRAM" (or "UNIT") implies you are starting; it also means BEGIN/END are only used to create lexical scopes. The period at the end just signifies the end of the program, same as with an English sentence. It fits Pascal's general approach of trying to provide redundency for safety.

    "It's all a matter of taste in the end."

    Absolutely.

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.
  12. Teaching vs. Industrial Use by lifeblender · · Score: 5, Interesting
    Hell yeah. I learned the same languages in that order when I was in grade school and high school.

    BASIC: self-taught including line numbers and even *shudder* edlin once one a random computer in elementary school, plus a year of high school. A wonderful language to learn with.

    Pascal: a dead language. Why the hell are people still using it? Whatever, I learned it in two years of high school, learned about pointers and trees and ADTs. Since it was DESIGNED as an educational language, NOT as an industrial language, it was great to learn with.

    C/C++: should die, except for programming kernels and hardware libraries. But I learned some of it in the last year of high school, and more in college. Great language for low-level manipulation and byte-counting accuracy (that's C only, not C++).

    They're trying to teach my brother basic computer science at UT Dallas by using Java. And not just Java, but Swing. It is a wondefully powerful language, just like C, and it has native threading, exceptions, and class extensions, so it blows C++ out of the water. But it is a horrible language with which to teach computer science. Horrible, horrible, horrible, even more so than C. My brother didn't know what a 'class' was, and they wanted him to use Java! Give me a break, and him, too.

    Once I got to college, I learned Haskell, then Python, PHP, a little JAVA, LISP, and assembly (okay, assembly for a simple machine). Haskell kicked my ass. Want to know why? Because I already 'knew' how to program. What I 'knew' was the suspension of disbelief required for working in the imperative programming world. Haskell is a great language for teaching people who do NOT know programming at all. My suggestion: start with Haskell, then move to Python (which is like BASIC in that it is interpreted and has a sparse syntax).

    Why do we have to make it hard on people during education? We should use Haskell, Python, Pascal, or BASIC in order to teach them. And why do we have to make it hard on ourselves as programmers? We should not use Pascal or BASIC for anything, and we should use other languages for what they are good for.

    And what is C good for? Explicit control and direction. Pascal? Nothing in the industry. If you're going non-standard (i.e. not C/C++), and you need absolutely enforced types, then byte the bullet and learn Haskell. Here, I'll make it easy for you: I've actually written a tutorial about Haskell for people who know languages like C (including Pascal, Perl, Python, PHP, etc.). If you know any of those languages, and you want to learn a better, simpler, more free way , please check it out. I made it just for you, really! Oh, just so I mention it, it's fairly easy to call external code from Haskell, so you can still be naughty if you need to.

    Thanks for the walk down memory lane.

    --
    Playing pornographics games during the day is evil! Play at night!