Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Free Pascal 2.0 Released 451

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."
This discussion has been archived. No new comments can be posted.

Free Pascal 2.0 Released

Comments Filter:
  • awesome (Score:3, Insightful)

    by Prophetic_Truth ( 822032 ) on Monday May 16, 2005 @07:09PM (#12548866)
    the more development tools, the better
  • by winkydink ( 650484 ) * <sv.dude@gmail.com> on Monday May 16, 2005 @07:10PM (#12548871) Homepage Journal
    and not meant in a trollish way, but what is Pascal used for these days? What are it's inherent advantages over other languages?
    • by Anonymous Coward
      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.

    • by NetNifty ( 796376 ) on Monday May 16, 2005 @07:13PM (#12548899) Homepage
      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.
      • Education I get, I meant production uses.
        • I think the only software I've ever seen made with pascal was Cubic Player (mod file player. ah fond memories) but that was back in the early 90s.

          I remember getting my first copy via sneakernet.
        • Education I get, I meant production uses.

          I know of one product, a flight planning and maintenance tracking app for small aviation businesses, that's still written entirely in Pascal. They guy who wrote it has been trying to convert it to C++, but has so far been unsuccessful. It's a terrible crawling horror of a program. It is, at least, Y2K compliant.

        • The Dev-C++ IDE is written in Pascal (Delphi), as unusual as that sounds. A whole lot of Windows software is written using Delphi, especially shareware, it's just not obvious to the user. Trying to do GUI development using Visual C++ was a nightmare, leaving Delphi as the only choice if you wanted easy RAD development and natively compiled code in the years before VB5 and VS.Net.
    • by rainman_bc ( 735332 ) on Monday May 16, 2005 @07:15PM (#12548921)
      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...
      • Well it's got the strength of C ..

        I have no idea what the strength of the language is, but I do know that Pascal is a Context Free Grammar [wikipedia.org] language. That what gives it an incredible compilation speed, but it also automatically means that it has very basic semantics compared to other languages in general and to C in particular.
    • 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.
    • debugging , pascal really strongly promotes clean codding . I can generaly pick a piece of pascal code and understand it very quickly as opposed to c or c++ which is more free form ( i enjoy to code more in C but i much preferreading others code in pascal)
      • by KiloByte ( 825081 ) on Monday May 16, 2005 @07:33PM (#12549142)
        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.
        • unfortunatly i agree , C took the crown and C based languages are here to stay .
          Pascal was slaughterd in the iso standard ( though still a very beutifull language) Its the language i cut my teeth on before moving to C and i have alot of respect for it .
          I don't think it would be imposible to resurect as pascal tends to be very freindly to new developers as it is very strict so errors are easy to discover.
          it just needs a buzz application to attract people towards it (note that in germany it is still used as
        • Let me spell it out for you -

          R e a l - M e n - D o n t - U s e - P a s c a l [practical-tech.com]
    • Object Pascal (delphi) is used to make applications, games or anything C and C++ is used to make. Is this free pascal object pascal or just regular old pascal?
      • 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.
    • Education (Score:5, Insightful)

      by jd ( 1658 ) <imipak@yahoGINSBERGo.com minus poet> on Monday May 16, 2005 @08:03PM (#12549527) Homepage Journal
      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.

    • I dunno. All the power of BASIC with the ease-of-use of C -- maybe it's designed to discourage people from becoming programmers.
      • I dunno. All the power of BASIC with the ease-of-use of C -- maybe it's designed to discourage people from becoming programmers.

        Closer to the other way around. Although Pascal does lack such "features" as allowing you to access arrays out of range. As the old saying goes, C gives you just enough rope to hang yourself, and C++ gives you 5 extra feet.

    • Well, Pascal is still used so that people can say how much better Modula 2 is.
    • by SAN1701 ( 537455 ) on Monday May 16, 2005 @09:33PM (#12550177)
      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 [wikicities.com] 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.
      • by Siener ( 139990 ) on Tuesday May 17, 2005 @02:46AM (#12551940) Homepage
        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"
    • To answer your question: Pascal is still used for teaching in some cultures. Delphi (and the Object Pascal language it provides) still have a following in some corporate circles, especially for database front-end work. And there's a fair bit of legacy code out there.

      Trivia: The original Macintosh System Software (later renamed MacOS, later renamed MacOS Classic) was written mainly in Pascal, with assembler where needed for speed or low-level implementation.

      I doubt much new, interesting work is done in P
  • Question (Score:4, Funny)

    by Anonymous Coward on Monday May 16, 2005 @07:11PM (#12548879)
    If you didn't see the first version, will you be able to follow the plot?
  • Ahh Pascal (Score:5, Interesting)

    by CajunArson ( 465943 ) on Monday May 16, 2005 @07:12PM (#12548891) Journal
    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)
    • Come on, you use "h", "x", "y", and the ever popular "i" for loops and counters, and you know it!

      Actually, it was kinda the same for me... it got used to descriptive variable names (...and Hungarian notation, which some people hate) when i moved from Basic / QuickBasic to Pascal and C/C++. Using short names was something i grow accostumed to with my C64 and it became a hard habit to kill until it became absolutely neccesary.

      And yes, Borland Turbo Pascal was an excellent package. I don't recall a whol
    • Amen to that!

      The original Turbo Pascal fit comfortably on a single 360K floppy, with space left over for DOS and all the source code you were likely to write. The IDE included everything you'd want (including an editor that would occasionally scramble files beyond recognition -- but in 1983, that was par for the course on PCs anyway) and nothing you didn't. It was a triumph of interface engineering, given the resources it had to work with (even today, I'd prefer it to most things).

      Kudos to the peop

    • Same here. Rather than studying for high school finals, I spent a couple of weeks and wrote a BBS program in Turbo Pascal with messaging, support for doors, etc. I released it with source to a few local BBSes but it doesn't look like that got mirrored to anywhere else as I lost the source myself and haven't been able to find it since. Only one other BBS that I know of set it up and ran it. Ah, memories...
    • My favourite Turbo Pascal was version 3. It supported neat things like untyped data - very unstructured of it, but it let me write a very nice I/O library as part of my O-Level comp sci project, where the database I'd written could pull any type of record from a file without worrying about the structure of the record. Generic data typing is one of the greatest strengths of C, was neat in Turbo Pascal 3, and a horrible nightmare in Ada.
    • Ok, a little extreme, but I can't remember the last time I used 'x' as a variable name... joy)
      But the Joy language [latrobe.edu.au] doesn't even have variables!
  • missed opportunity (Score:4, Interesting)

    by Anonymous Coward on Monday May 16, 2005 @07:14PM (#12548911)
    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 :(

    • by messju ( 32126 )
      I'm neither in GCC nor in FP, but FP as a GCC *frontend* would make more sense to me.
    • you got a copy of the mails confirming that? i've never heared any of the developers mention it (and i hang out on irc with them a lot)

      freepascal does like to do things its own way and i don't really blame them. much less stressfull to stay away from politics and just write a compiler with a smallish but friendly team.

      The only real problem this brings is support for less CPU types than GCC has.

      btw freepascal is written in pascal (and only compiles using freepascal nowadays).
    • However, I wish the FP (and I don't mean first post) people and the GCC people would settle their pissing match.

      Funny thing. But, FPC people are known for their pissing matches. Go and start reading their mailing list. It's one big pissing contest (in fact pascal people always held pissing contests with C, but I don't remember a lot of C people being bothered). Whenever someone tries to get something new... well, here we go...
  • I remember the good old days of Turbo Pascal, working with just 640kb of conventional memory, and trying to figure out how to swap some extended memory pages in, or use the mouse. It's pretty amazing how far programming languages have become - whether Windows or Mac it's certainly a lot easier to do a lot more knowing a lot less, for better or worse.

    That said, does Pascal really have a place these days? C is really the dominant language, and I can't help but think that this is more of a vanity project f

    • there are lots of delphi apps out there its just it isn't so obvious which ones they are (hint: look for names ending in .dfm in a resource viewer)
    • 4 years of Comp Sci in HS 1986-1990 starting out with Turbo Pascal 3.0 - oh the joys experienced when we got all the way up to 5.5 with the improved editing system. Our lab had a utility picked up from somewhere that would automatically format the sourcecode into neatly indented, spaced and CAPed variables and whatnot. (Which some smartalec modified to reformat all sourcecode removing all lowercase letters that weren't in quotes, all formatting spaces, indents and carriage returns to try and get the entir
  • Pascal and Delphi (Score:2, Interesting)

    by terryfunk ( 60752 )
    Is Pascal used mainly with Delphi these days? I wrote software in Pascal years ago, when you could get Borland's Pascal.

    I went on to other development tools but always liked Pascal and its descendents Modula and Oberon. I never understood why Oberon never took off either.
  • Pascal (Score:5, Interesting)

    by FidelCatsro ( 861135 ) <.fidelcatsro. .at. .gmail.com.> on Monday May 16, 2005 @07:17PM (#12548935) Journal
    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
  • SmartEiffel, Oberon (Score:5, Interesting)

    by cahiha ( 873942 ) on Monday May 16, 2005 @07:19PM (#12548963)
    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.
    • Unfortunately, SmartEiffel is currently going through a few growing pains (I hope). The 2.0 release breaks a lot of old code, and the 2.1 release breaks a lot of 2.0 code.

      They've just recently decided that they are deisigning for a language that doesn't match any of the other specifications of Eiffel (close...but not compatible). I don't know what is going to happen, but this is a good time to experiment, but not a good time to commit.
  • Pascal to me is more like a historical artifact that I might want to know more about and maybe learn. (Kinda like learning Logo on the Apple ][ in middle school during the early 80s.) Jerry Pournelle wrote quite a bit about Pascal in Byte Magazine during the 80s, and had made a few references in recent issues of Dr. Dobb's Journal. I never actually seen the language when I was going to college in the early 90s or even the last four years that I been learning computer programming. Can any recommend a good hi
  • Boggled (Score:3, Interesting)

    by rscrawford ( 311046 ) <rscrawford&undavis,edu> on Monday May 16, 2005 @07:27PM (#12549048) Homepage Journal
    I remember taking AP computer science back in 1984 and studying Pascal. Anyone else remember Oh! Pascal? I can't remember a thing about the language now, but I remember having a lot of fun playing with it on one of those old Commodore CBM machines. And since the computer I had at home was a TRS-80 CoCo 2 which didn't talk Pascal at all, I contented myself with trying to structure my BASIC programs (back then, BASIC had line numbers) like Pascal programs. Hard to do in a language that doesn't have a concept of modular programming.

    Course, back then, Fortran was barely even Threetran, and we had to walk fifteen miles to school in the snow, uphill both ways.
  • It sounds like this "Pascal" is quite extended compared to the original. That's a nice start, but how does it measure up in terms of features to, say, Modula-3? Pascal faded into obscurity everywhere twenty years ago (except for a dwindling number of intro CS classes). What are people planning to do with this? Is it more than retro chic?

    • freepascal has mostly followed what borland did with the language up to and including about delphi 5 and ahs made a few improvements of its own.

      i can't compare to modula 3 as i've never used it.
  • Why did pascal lose popularity?
  • I remember in the early 90's making a code review on someone's pascal code. His program was underperforming running very slow. I found out he was passing a typedef'ed char array of 255 characters as value to some function. Pushing the entire array into the stack on every function call was killing performance. After changing that to pass the array as a reference the app performed drastically better. And that was just by adding 'var' in front of the parameter argument.
    • yeah this was a big issue with old style pascal strings (which were essentially just large arrays) if you weren't carefull

      btw you should have used const not var if you didn't intend to modify the parameter inside the procedure.
    • I'm not very sure if I prefer the C notion that passing an array is actually always passing down a reference to it. Or that objects, but not primitives, are always passed by reference in Java. Try to teach a class what the stack is and that parameters are just funky names you give to copies of your data, when so much of it is still treated like they weren't copies at all.

      In C (and even more so in Java) you shoot yourself in the foot in the foot by accident, you get the wrong results from what a naive inter

  • Why bother? (Score:5, Interesting)

    by cruachan ( 113813 ) on Monday May 16, 2005 @07:55PM (#12549438)
    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.
    • Re:Why bother? (Score:3, Insightful)

      by Anonymous Coward
      Because the Delphi dialect of pascal *is* such a good language, because FreePascal supports Delphi and because Borland's continuing support for Delphi (and certainly Kylix) is highly suspect at best.

      Actually Borland's future is rather uncertain these days let alone their Delphi product support, so an open source cross-platform alternative for Delphi developers is most welcome addition to the FOSS landscape.
    • Re:Why bother? (Score:3, Informative)

      by petermgreen ( 876956 )
      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).
  • Standard reading (Score:3, Interesting)

    by Hugonz ( 20064 ) <hugonzNO@SPAMgmail.com> on Monday May 16, 2005 @08:13PM (#12549635) Homepage
    I'm impressed it has not shown yet here, but it's standard reading:

    Whay Pascal is not my Favorite Programming Language [lysator.liu.se] by Brian Kernighan.

    • Talk about the pot calling the kettle black. Pascal was a teaching language that accidentally found itself for production work. C was a language constrained by the limited memory of the platform its first compiler was developed for. Neither should really have caught on for general purpose programming...
    • 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)
  • Why Not GCC (Score:4, Interesting)

    by wsloand ( 176072 ) on Monday May 16, 2005 @08:16PM (#12549657)
    Does anyone know why this is not just part of GCC? It seems that with the current methodology of compiling from a language to the GCC middle language that essentially any supported compiled languages would gain from being part of GCC.

    Feel free to correct me if I'm wrong here.
    • Re:Why Not GCC (Score:3, Informative)

      by marcovje ( 205102 )
      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 ve
  • So, this is a compiler that can run under Delphi (with help from another FS project), but supports more target CPUs than the native Delphi compiler. Sounds very promising - does this mean that perhaps someday one could use Delphi (or Kylix?) on a PC to write simple apps for palmtops, such as the Zaurus or even a PocketPC?

    I'm not talking about anything really fancy, but I'm hired to do a lot of data-gathering apps - glorified highly-customized time tracker programs - and it would help a lot if I could comp
    • no it doesn't run under delphi as such it is a compiler in its own right.

      it can (in the appropriate mode) compile delphi like pascal code and it has much of the nonvisual parts of the delphi libraries availible (visual parts are being handled by the seperate lazarus project)

      there have been some experments with using freepascal with the zarus although arm functionality is kinda expermental right now (its not good enough to cycle the compiler on arm right now but you can cross compile a compiler for arm and
  • Sometime before the ark sailed, Pascal was the first programming language I learned (well, except for Ti58) at college, which was on a DEC 10. An elegant, structured language as I recall, but my elegant and structured code never ran. Why? I discovered a neat way to make the code more efficient, but after many long, long sessions in the terminal room, I was told a bug in the compiler would not compile anything with that routine. So after three years of college and an IT degree, not one piece of code I wr
  • by hey ( 83763 ) on Tuesday May 17, 2005 @03:15AM (#12552046) Journal
    The Pascal assignment operator :=
    sure beats C's = any day of the week!

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...