Free Pascal speeding along

By   |  December 13, 2005

The latest version of Free Pascal, version 2.0.2, has been released. According to the developers, “in combination with the Lazarus development environment, Free Pascal can be considered the ultimate desktop development tool.”

Free Pascal builds on the long tradition of the Pascal language, first invented in 1970 by Niklaus Wirth, and named in honour of 17th century French mathematician Blaise Pascal. It builds on the 1980\’s to 1990\’s success of TurboPascal and the modern Borland Pascal environments, Delphi and Kylix. Unlike Borland\’s environments, Pascal is an open source project, competing more with the Gnu C compiler (GCC).

Although byte code – used today by managed languages like Java and .Net – was originally a Pascal initiative, Pascal uses pre-compiled code (called an unmanaged language) to get extra performance out of software developed for a specific environment.

According to the Free Pascal development team, “the compiler is well suited to compile very large software projects consisting of millions lines of code. Developers of those projects will be very pleased with the speed of the compiler, which is many times faster than GCC. The Free Pascal compiler is the most advanced open source compiler engine besides GCC.”

Free Pascal supports multiple environments, including Windows, FreeBSD, Linux and Mac; and will run on a wide range of processors, from 32-bit and 64-bit Intel through to ARM, PowerPC and Sparc.

The new version is not a major upgrade over version 2.0.0 released in May – primarily bug and compatibility fixes. Database support has been improved, as has tuning for SSE. Free Pascal will prove to be an interesting project to watch, especially for developers who demand speed above all else from their applications.

Comments

8 Responses to “Free Pascal speeding along”

  1. Anonymous
    December 14th, 2005 @ 12:00 am

    Man… type Begin End instead of {} again… I don\’t think so.

  2. Ralph Moritz
    December 14th, 2005 @ 12:00 am

    Why Pascal is Not my Favourite Programming Language
    by Brian W. Kernighan:

    http://www.lysator.liu.se/c/bwk-on-pascal.html

  3. neli
    December 14th, 2005 @ 12:00 am

    Note that the language has much improved since 1981, (date of that \”why I do not like Pascal\” document), and all issues with the language in that document have been addressed in free pascal. Note that it\’s also object oriented, supports initialization of global variables, support dynamic arrays and more.

  4. noch
    December 15th, 2005 @ 12:00 am

    FreePascal compiler is the best cross-platform development tool which now exists.
    Thanks to developers!

  5. sekel
    December 15th, 2005 @ 12:00 am

    Great article!

    May I repost it on Linux Questions?

    If so, what credits should I add?

    We\’d prefer it if you post the headline and first paragraph on Linux Questions, with a link to the article. If there\’s a specific reason for you to post the full article, drop us a mail at news@tectonic.co.za with your reason – Ed

  6. Giulio
    December 15th, 2005 @ 12:00 am

    For the begin end thing… well Pascal is a verbose language. I think that you should spend most of your time thinking, and then coding. Writing speed is a problem only if you need to type in code that you read from a paper, since you don\’t need to think while doing so 😛
    Verbosity improves readability and elegance.

    For \”why pascal is not my favorite language\”… well it\’s old stuff written in early eighties. Now a lot has changed, and I found only a sentence that might still be valid:

    > 1. Since the size of an array is part of its type, it is not possible to write general-purpose routines, that is, to deal with arrays of different sizes. In particular, string handling is very difficult.

    There are now dynamic arrays :)

    >2. The lack of static variables, initialization and a way to communicate non-hierarchically combine to destroy the “locality\’\’ of a program – variables require much more scope than they ought to.

    This remains true, even if you can have a global variable that is global to local unit and not to the whole program.
    But sincerely I don\’t think it\’s a big issue :)

    >3. The one-pass nature of the language forces procedures and functions to be presented in an unnatural order; the enforced separation of various declarations scatters program components that logically belong together.

    You can declare functions in the interface part of the unit and then implement them, so you can sort them in the way you like. In main program you can use forward declarations.

    >4. The lack of separate compilation impedes the development of large programs and makes the use of libraries impossible.

    It\’s not true anymore. Moreover speed compilation is light-fast, so for large projects you compile in minutes, while in c you can reach hours (it still remember when I recompiled QT libraries…)

    >5.The order of logical expression evaluation cannot be controlled, which leads to convoluted code and extraneous variables.

    Use parenthesis, they make your code clearer.

    >6. The \’case\’ statement is emasculated because there is no default clause.

    There is (but it\’s called else instead of default).

    >7. The standard I/O is defective. There is no sensible provision for dealing with files or program arguments as part of the standard language, and no extension mechanism.

    Not true, still from early turbo pascal days

    >8. The language lacks most of the tools needed for assembling large programs, most notably file inclusion.

    Not true anymore, most notably there is file inclusion :)

    >9. There is no escape.

    There is. It\’s a strong typed language, but you can use typecasts if you want. Good news is that you have to do them explicitally, and this contributes to find out distraction problems at compile time.

  7. System123
    December 2nd, 2008 @ 7:46 am

    I never get this Pascal vs C debate. I program in Pascal and I am currently creating a hobby OS in it which is just as fast as any C OS. If you know how to code you can make Pascal do anything that C can do. The whole debate that you can’t write one procedure for ie: sorting, because the arrays might be different lengths is a load of rubbish. Learn to code Pascal properly and you will be amazed.

  8. madflame991
    February 1st, 2009 @ 10:30 am

    Wanna use symbols instead of words? Wanna have naturally obfuscated source codes? Wanna feel the pain of programming? Wanna read utterly long lists of errors? Use C!
    And if you just want to program use Pascal. For example:

    In C, you can do this:
    for(;P(“\n”).R-;P(“|”))for(e=3DC;e-;P(“_” (*u /8)%2))P(“| ” (*u/4)%2);

    In Pascal, you CAN’T do this :
    for(;P(“\n”).R-;P(“|”))for(e=3DC;e-;P(“_” (*u /8)%2))P(“| ” (*u/4)%2);

    Looks cool, use C!

Comments are closed