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."

19 of 451 comments (clear)

  1. Re:Out of curiousity... by Anonymous Coward · · Score: 2, Informative

    As a Delphi developer, I always tell people, it's the power of C++ with the easy of VB....with out all the inherient problems that VB gave us. On windows I've not found a tool that provides a faster way to develop "real" applications.

  2. Re:Out of curiousity... by petermgreen · · Score: 2, Informative

    think of delphi style object pascal (as seen in delphi and freepasca). as a hybrid oop/procedural language without the huge complexity of C++ but also without the nany state style restrictions or deployment issues of .net or java.

    also the delphi IDE was one of the few rad environments that could compare to the development speed of VB imo.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  3. Re:nightmares by petermgreen · · Score: 3, Informative

    its so sad the impressions people like you get of pascal from shitty expericances in the education system.

    modern object pascal (as in delphi and freepascal) is actually a very nice language that imo gets the balance between power and complexity just right. (unlike C++ which is extremely complecated and bytecode languages that imo feel crippled)

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  4. Shootout by Anonymous Coward · · Score: 1, Informative
    You can even compare them on the Great Computer Language Shootout... Hey, those last two links don't work properly. Sue me.
  5. Re:Out of curiousity... by petermgreen · · Score: 2, Informative

    that depends on the mode setting you use. In delphi mode it tries to be as close to dlephi as possible. In objfpc mode it supports most delphi features but with slightly cleaner syntax rules in some areas. The other modes are procedural only afaict

    most of the nonvisual components from delphi are there in some form. Visual stuff is being handled seperately by the lazarus project.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  6. Re:awesome by ed__ · · Score: 3, Informative
  7. Re:Why bother? by petermgreen · · Score: 2, Informative

    However all the advantages of Delphi do not apply to Free Pascal

    freepascal supports almost all of the language features of delphi and most of the nonvisual classes

    the visual bits are being cloned by a seperate project known as lazarus (its rather unpolished atm but its getting there).

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  8. Re:Standard reading by petermgreen · · Score: 2, Informative

    read it and what it really says is that ISO PASCAL is a horrid language. I do not dispute this.

    however the recent borland like dialects of pascal are very different. Maybe the pascal name should have been dropped at some point (borland did pretty much drop it with later delphi versions). But we don't really have any better names that people would recognise and that don't have connections we don't want (the name delphi is strongly associated with the delphi ide)

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  9. Re:awesome by connorbd · · Score: 2, Informative

    The main problem with Pascal is that in its purest form it's too elegant, and efforts to make it usable for Real Work have generated incompatible variants on the language. That's why any serious attempt at a Pascal compiler has to speak not only ISO Pascal (a cripple of a language that Brian Kernighan famously tore apart in an essay called "Why Pascal Is Not My Favorite Programming Language") but at least three or four different extended dialects (just as an example, Turbo Pascal and Apple Pascal).

    Pascal should have died out long ago, but it's got a very dedicated and talented hard core of enthusiasts that have been keeping it alive for some time, and then along came Delphi and secured it a place in development circles for all eternity.

  10. 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.
  11. 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
  12. 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.
  13. Re:Education by namekuseijin · · Score: 2, Informative

    "C is much more powerful,"

    sorry, how come? Pascal doesn't easily allow buffer overflows, have proper string handling, is truly lexically scoped ( with proper nested lexically scoped procedure declarations ), has a much more powerful and expressive type system, is a hell of a lot more readable than C and even allows, just as C, to get low-level with pointer arithmetic but somehow... C is much more powerful??!!

    i don't get it.

    if you said C was a little more concise thanks to the choice of {} rather than begin end block delimiter, than i'd agree with you on that...

    at least, here in Brazil, Delphi is the number one software tool, making Pascal ( ObjectPascal ) possibly the most popular language around. though java is coming close and there's also a lot of VB junk...

    --
    I don't feel like it...
  14. Re:Standard reading by Anonymous Coward · · Score: 1, Informative

    Why C is not my Favorite Programming Language

    You were saying?

    (Point being that Brian Kernighan's criticism towards pascal is very, very dated in the piece you linked to)

  15. Re:Why Not GCC by marcovje · · Score: 2, Informative

    Some reasons, there are more:

    - The GCC architecture with its LALR parsers is not fit for pascal LL(1) parsing model
    - GCC has no support for autobuilding.
    - gcc is dog slow, pascal users used to Borland compilers don't accept that. (autobuilding and separate AS are main reasons for that)
    - Negotiating with commercially supported GCC teams as a small team is a hassle (can you imagine: please hold of the GCC 4 release, I want to commit some Pascal fixes)
    - gcc's build process has too many dependancies, and is very complicated.

    GNU Pascal tried this, I suggest you try GNU Pascal, and then FPC Pascal, and feel the difference (keeping in mind that GNU Pascal is 6-8 years older)

  16. Re:awesome by marcovje · · Score: 2, Informative


    Borland dialects relax the B&D aspect, but keep the overal sane structure.

    Everything done in C can be done in FPC, the only practical thing I can think of is that with C you can make large static datastructures easy using preprocessor.

    However using an external preprocessor is of course possible with any language.

  17. Re:Teaching vs. Industrial Use by master_p · · Score: 1, Informative

    A wonderful language to learn with

    Why was it a wonderful language for educational purposes? the most important aspect of programming is to learn how to structure ideas into code, and BASIC was not about that. BASIC was an abomination of programming languages, responsible for many wrong programming attitudes.

    Why the hell are people still using it?

    Because it is beautifully structured and fairly disciplined, without the risks of C but also without the virtualization of Java or 'next generation' programming languages.

    Since it was DESIGNED as an educational language, NOT as an industrial language, it was great to learn with.

    What do you mean? Pascal was THE industrial language at the age of DOS/Windows 3.1. Thousands of commercial applications were written with it (especially the Borland variant). The reason it was chosen as an educational language was because of its success in the industry, much like Java today.

    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++).

    Most obviously you've never programmed seriously in those languages. C and C++ are two entirely different programming languages, and C++ is not a superset of C. First of all, C is needed for lowlevel programming. It will never go away. Secondly, C++ is the greatest programming language ever, if you use it properly. With its generic programming through templates and operator overloading, it can even be used as a functional programming language (check out Boost if you don't believe me).

    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.

    What do you mean "it blows C++ out of the water"? have you tried C++ with boost and/or Qt? it blows Java away big time, both in programming effort and performance. You are obviously ignorant of what goes on in the real world.

    Haskell kicked my ass. Want to know why? Because I already 'knew' how to program.

    So you are one of those impressed by functional programming languages, eh? let me tell you something: functional programming languages suck big time. They are just hyped by those that invented them, but they are not useful for anything practical. They are good as a general scripting environment for bridging together libraries written in C/C++/Java, but they are not good for anything else:

    • All functional programming languages use the available C APIs. No functional programming language has a primary toolkit programmed in itself, as in Java (for example). Checkout O'caml, for example, that its toolkits are 90% similar to those in C!
    • Functional programming, i.e. programming without assignments can not be used for anything serious. A database can't be sorted with the functional quicksort, simply because functional programming copies values around, instead of updating them.
    • No matter what you've heard, closures, strict types and continuations are not properties of functional programming only. Those exist in lots of imperative languages, too. And for all practical reasons, closures are nothing more than C/C++ callbacks.
    • It is a myth that with functional programming languages, you just write it once and it works. It works if the expressions you have written are correct. If you mistakenly type in '+' instead of '-', your algorithm is wrong. Using the lambda calculus proves nothing, expect that the result is always the same for a specific set of values.
    • Functional programming languages have syntax that goes against human intuition. For example, Haskell uses the symbol '++' for 'or', and O'caml uses the symbol '#' for 'membership', whereas
  18. Re:Out of curiousity... by petermgreen · · Score: 2, Informative

    the reason for the unusual taskbar menu is that the taskbar button in delphi was made independent of any particular form it just exists as an app global entity (and has its own window handle etc).

    afaict the reason why they did it this way was for the delphi IDE itself. try loading the delphi 1 ide on a version of windows with a win95 like shell and you will get a flood of taskbar buttons. The one taskbar button approach worked better for thier ide and presumabbly for other apps that used forms in a similar way.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  19. Re:Out of curiousity... by doconnor · · Score: 2, Informative

    Borland has servived compeating directly against Microsoft for about 20 years now. A lot better then most other software companies.