Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

FreePascal v1.0 Released 133

A huge number of people wrote in to say that FreePascal, the BP 7.0 and Delphi compatible compiler finally has an official release. Check it out at http://www.freepascal.org to get version 1.0.
This discussion has been archived. No new comments can be posted.

FreePascal v1.0 Released

Comments Filter:
  • by Anonymous Coward
    no
  • Well, probably you do not know... Modern days Pascal, unlike one invented by Wirth, is a powerful OO language. Any program, written in C can be translated more or less directly into Pascal (I mean - no emulation needed). Reverse is false. Some people would say that Pascal (Delphi) object model is better than that of C++. This is arguable. It doesn't support - multiple inheritance, templates, overloading. It, however, has features, absent in C++ like read/write properties.
  • I first learned Pascal in a very cool syntax-directed programming environment called "Alice: The Personal Pascal.", written by Brad Templeton (of ClariNet, EFF etc., fame). What a program.
    I loved the fact that it was impossible to make a syntax error - the skeleton of your code constucts were written for you as templates. Automagically. As brad explains on his Web Page [templetons.com] :

    ...For example when you type for in to the "Statement" placeholder, you immediately see:

    for variable := start to finish do begin Statement end;
    [ but nicely indented.]

    And all you do is fill in the blanks. But at each blank you can get help, get a menu of what you can type and more...."

    Brad has released the Source Code ready to compile on Linux [templetons.com]. Someone please please make an RPM out of this!

  • Comment removed based on user account deletion
  • The CompSci department when I was at the University of Maryland back in the mid 80's required us to use a campus built Pascal interpretter that worked exactly the same way.
  • Sweet! From what I've been told previously by the maintainers of TradeWars (for those not in the know, TradeWars was/is a multi-player BBS door game which takes place in a "universe" in which you gain power by trading, fighting, and cultivating planets. good stuff.), the only thing stopping them from making a Linux port has been the lack of a good pascal/delphi compiler.

    awwwwwwwwwww yea =)
  • Why some people don't get it - I'll never now! Statically linked VCL creates the bloat, not a compiler. And you do have two other options: 1) don't use it 2) place it into a shared lib(DLL, via packages).
  • > IMHO delphi properties are syntactic sugar

    This is true.

    Foo.Bar := Foo.Bar + 1 is internally translated to
    Foo.SetBar(Foo.GetBar + 1); much as overloaded operators are translated into function calls internally.

    Different goals for different languages I guess.

    Unlike with operator overloading, I have yet to see a bug or obfuscation introduced by use of a property instead of the equivalent acessor methods.

    Actually, one of the reasons why properties were introduced in Delphi 1.0, was that, combined with RTTI, they provided a way to go one better on VB's visual object inspector. However, I find them way useful all over my delphi programs.

    Properties give you a good level of abstraction - a class's public data and methods can be treated the same way. You can change a public data item to a public property with gettor and settor methods without any client code breaking.

    but we are desecending into language wars. Different keystrokes for different folks.
  • That's great! I really enjoy Pascal programming, and sometimes I'd like to put together some GUI apps but, being unfamiliar with both the language and the toolkit makes things difficult. Maybe using a familiar language I could go through the GTK toolkit with less trouble. What is needed now is Glade support... Last time I checked it could generate even Eiffel code, but not Pascal...
  • You know what 'Paska' means in Finnish? Shit..
  • I'm shocked...seriously, I'd be really curious to hear if anyone specifically knows of any large projects in recent time that have written in Pascal?

    There's quite a bit of Windows software written using Pascal. Some commercial games, even.

    The three things that make Pascal a wonderful development language are:

    1. Very tight module control. You don't need separate header files. Everything is very clean and organized.

    2. Less temptation to trivially optimize code by using inline functions and pointer math and such and multiple ways of phrasing simple expressions. I find there's less mental baggage associated with Pascal programming than in C++.

    3. Lightning fast compiles. Big projects, ie. 200,000 lines, rebuild completely in 20 seconds or so. Normal "bring project up to date" operations are instantaneous. This is over an order of magnitude better than any C++ compiler I've used.
  • by Anonymous Coward

    I promised myself I'd never post to slashdot...

    I'm surprised no one has already mentioned it, but there is another free pascal out there, GNU Pascal. You can find it at http://agnes.dida.physik.uni-ess en.de/~gnu-pascal/ [uni-essen.de]

    It uses the GCC back-end, and is (IMO) a nicely-designed system. Check i tout if you're into Pascal!

  • I'm not sure if this counts as recent, but Pascal used to be the language to use in the PC Demo Scene [scene.org]. Of course most of it was inline ASM...
  • >> Templates - It is unlikely this will ever be
    >> included in Delphi for the simple reason of
    >> compilation speed.

    > That reasoning is wrong and that reasoning has
    > been ripped apart often enough.

    I'd say a better point against templates is that they can lead to serious code bloat. Naive implementations that don't consolidate common functionality in a base class can lead to incredible code multiplication. Of course, in the hands of a decent programmer they can be quite handy (he, he), but then again, a decent programmer can make even a crappy tool work to advantage.


    Uwe Wolfgang Radu
  • Personally, I don't like this automatic stack-object deletion. I prefer a uniform system: either you don't worry about memory management at all (Java) or you do (Pascal, C). A combination of both only causes confusion imho.

    Linking at the procedure level instead of at the unit level is mostly a feature of the compiler. In FPC we fake this more or less by compiling all variables and procedures to seperate objects, put all those objects in a library and then let LD figure out which which objects are needed when linking. The big disadvantages are

    • you have to create an insane amount of object files for some moderately complex units. Fortunately, we've now got a built-in assembler (based on NASM, but optimized and tweeked) and a library writer which makes up for this.
    • LD is sloooooooooooooooow when linking against such libraries. That's why we'll start working on an internal linker as well.


    --
  • C++ may be standardized, but try moving a large C++ project from one compiler (e.g. MS VC++) to another (BC++, G++). You'll find you'll have to make quite a bit of changes to get it to compile. The problem is that the C++ standard has been evolving almost constantly, although it seems it's finally settling down.

    ANSI Pascal and Extended Pascal (the official Pascal standards) have never been really popular, almost all Pascal development has been done in one or other UCSB (sp?) Pascal dialect (Borland Pascal/Delphi, Apple Pascal, ...). I suppose (hope) that one day the ISO will see this and create a new Pascal standard based on this, with extra features in it such as operator overloading etc. Until then, it's mainly Borland who sets the standard and us following it (unless there are things which Borland hasn't implemented yet, such as operator overloading).

    --

  • by Anonymous Coward
    It however has no Delphi compability, classes or exceptions
  • by Anonymous Coward
    Strongly typed languages like Pascal = fewer mistakes. Use it when quality counts. Yes, it is less productive, and you are limited - but you end up with elagance. Pascal, Ada - the military use it, but I think QA is less trendy these days.
  • Pascal is one of those languages that is great for teaching the basics of programming. The computing science department at the university that I work at (www.computing.edu.au) [computing.edu.au] has switched from Pascal as its first introduction to programming and design. they have decided that Java is a good start. As the school is very much a UNIX based school, this is the sort of project that they could really sink their teeth into.
  • by dybdahl ( 80720 ) <info@dybdahl . d k> on Wednesday July 12, 2000 @09:34PM (#937966) Homepage Journal
    Anyone who does project management on large projects will find out that C and C++ requires more qualified programmers and up to three times as many programming hours than Inprise Delphi.

    I have used Pascal since Compas Pascal, which was the successor to Nascom Pascal (was it 4KByte?), and predecessor to PolyPascal, Turbo Pascal, Borland Pascal and then Delphi.

    Having done several projects in C, C++, several assemblers, Visual Basic etc., there is no doubt, that Pascal makes quality control in large projects much easier, and the fact, that the linker is not technology from the 1970's really improves productivity and encapsulation.

    I guess that I write approx. 20-40.000 lines of code a year, which would compare to the double in C++ lines. FPC makes me able to do open-source development using this fabulous language, even before Inprise puts out Delphi for Linux.

    The traditional problem with Pascal is, that it tends not to be cross-platform. The good thing is, that you can make the same program three times with the same efforts as it would take to do it in C++ - and that alone justifies its use.

    Delphi is the full-blown compiler, with which you can write a 10-table database GUI program in one day, where the final program will only be one .exe file (on Windows), that doesn't need special DLL's to be installed.
  • by speaker4thedead ( 193887 ) <sam.walters@gmail.com> on Wednesday July 12, 2000 @09:34PM (#937967)
    Geez....we just got done freeing Mitnick and now we gotta free Pascal? When will this end!?
  • Some notes (and a question):
    • FPC/Delphi do support exceptions
    • What restrictions does (Free/Delphi) Pascal have compared to Java?
    • The ability to link to libraries has nothing to do with a language, it's handled by the compiler/linker. Both FPC and Delphi can link to C libraries without any problems (and using exactly the same syntax). I don't know about Delphi, but FPC can't use C++ stuff in libraries, though we're working on that
    • I personally prefer begin..end to {..}. One reason is that people are much less inclined to write "end end end;" then "}}}", which improves the readablility of code quite a bit (and even if you indent properly, it's imho much easier to see which begin..end pairs correspond than which {..} pairs). It's just a matter of personal taste, not a reason why one language would be more suited to "real application development" (whatever that may be) than the other
    • you not being able to imagine anyone in your company doing serious work in Pascal is probably because everyone there is about as prejudiced as you regarding Pascal ("It's good as a beginners and teaching language, but that's about it..."-mentality)


    --
  • You say they're hacks, I say they're a more intuitive way of implementing a facet of OO. Attributes or properties have OO grounding. An object has some data and some actions that can be performed upon it...but it also has some attributes that can be queried. Properties are a nice way to expose/publish those attributes without clunky getters and setters.
  • It seems that garbage collection will eventually weasle its way into most surviving programming languages, so stack objects might not matter too much. What I mainly like about them is the more concise procedures they allow. I'm a stickler for saving those extra two three lines of code.

    I realize that linking at the procedure level is a compiler feature, I thought I implied as much in my post. Still, I find it amazing that C/C++ compiler vendors have gone out of their way to add all kinds of arkane features, yet mostly haven't gotten around to this pretty useful one.

    Uwe Wolfgang Radu
  • I think there is room for a Template system I just don't like the idea of a template system that has the power to chuck type checking out the
    window.


    I'm just curious exactly what you have in mind here. Perhaps you are reacting to attempts in other languages to create parameterized types -- C++ templates do not to my knowledge create any new type safety issues. As far as I can see, templates actually improve type safety in practice because they eliminate the temptation to downcast variables (cast a variable of type A to a subclass type B) in order to make generic classes for containers and the like.

    The idea of a template is to make a generic class that can safely be reused with a variety of types. The different types are like bound parameters -- they can be substituted freely AT PREPROCESSING time. If you reference a member or method that doesn't exist the parameterized type, you will generate a compile time error because the member doesn't exist or the prototype doesn't exist.

    The main problem I've had with templates have been with old, broken debuggers.

    My the way, I agree 100% on multiple inheritance. It creates huge problems for very little practical gain. And don't get me started on reference variables. I like the simplicity of C here -- parameters are always pass by value, only sometimes the value is a pointer. This is much cleaner because if you call foo(&bar) in C you know that bar is probably going to change, whereas in Pascal or C++ if you call foo(bar) you have to have the function prototype in your head.
  • ...more like ignorant and proud of it.

    > Pascal is pretty much dead

    Oh, is that why Borland released 5 widely used versions of Delphi, and counting?
    Is that why the Linux release of this product is so widely anticipated?

    > Can basic be used for any serious program ? No

    Your point being? Oh, right, Object-Pascal is basic. Wrong.

    > visual basic .. has some nice parts to it

    I'll think you'll find that Delphi has all of those parts, but is not built upon the mud that is the VB language. It is a good OO language, and generates fast, library-less executables. FP has the potential to be as great.

    > If you are planning to develop an application, what do you think of first

    Delphi, actually. YMMV.

  • I agree with most of what you say, except:

    1. Having stack objects can be very nice. You simply declare the variable at the beginning of the procedure, use it, and when it goes out of scope it automatically calls the destructor. In Delphi you always have to make sure to call Free, hence the need for try...finally, and that can lead to accidental memory leaks. Still, I live every day without this feature and still love Delphi.

    2. Units. I really hate that you can't spread a class definition across units. It's also very easy to end up with circular inclusion, which Delphi doesn't allow. So basically, if you have several classes that in any way reference each other, they ALL need to be in the same unit. Which of course leads to the HUGE units of the VCL.

    Still, the fact that Delphi compiles and links code on a procedure level rather than unit level (as C/C++ does) helps a lot and makes my point 2 above more of an aesthetic niggle than a real problem. And while it might have nothing to do with Pascal per se, I sure love Delphi's compilation speed. Whenever I have to switch to C++ for some other project and have to wait around for minutes for it to compile, I gladly run back to Delphi. I like saying that no matter what the project, Delphi takes 5 seconds to compile it. Hello world? 5 seconds. Windows 2000? 5 seconds (eh, make that 10).

    Uwe Wolfgang Radu
  • 2. Units. I really hate that you can't spread a class definition across units. It's also very easy to end up with circular inclusion, which Delphi doesn't allow.

    You may already know this, but to avoid the circuluar units you just add the unit you need in the 'Implementation' uses clause rather than the uses clause under 'Interface'. Units can freely re-use each other if they are referenced in the Implementation section only.
  • by nd ( 20186 )
    Pascal was definitely the language of choice of the BBS days. There were over 20 Turbo Pascal doorkits, with maybe a handful of C ones (and they weren't pretty).

    BTW, a little bit of history - WWIV was eventually a C project I believe, as only early versions were in Pascal.

    I've written a lot of BBS software in TP 7.0, including a doorkit, several doors and utilities, and about 75% of my own BBS software.
  • Yes... 20000 meters. Of course he neglected to mention that it's only 1 micrometer long. That's right, a unbeknownst to the inhabitants, a large portion of the earth is in fact covered with a thin layer of this man's penis. Scientists had previously mistaken it for a large mold colony.

    Sorry, I'm just in a silly mood right now.

  • Mitnick and Pascal, two things the world could have done without.
  • by NevDull ( 170554 ) on Wednesday July 12, 2000 @09:53PM (#937978) Homepage Journal
    With a name like FreePascal, couldn't the "release" have waited until Bastille Day?

  • by Halo1 ( 136547 ) on Wednesday July 12, 2000 @09:57PM (#937979)
    We are indeed no (L)GPL specialists, but the modification to the LGPL we've done is that we allow static linking under Dos (because, afaik, you normally are forced to dynamically link against LGPL libraries dso the user can upgrade the libraries seperately from the program). Dynamical linking under Dos is even supported yet afaik...

    --
  • Use bar or atm instead...

    We've lost cabin pressure...
    /Droid
  • by Halo1 ( 136547 ) on Wednesday July 12, 2000 @10:03PM (#937981)
    No, we don't assume that inux=ia32/linux. The problem is that the compiler started out as a 80x86 only project. The m68k port was later on done by one person (who almost literally translated the 80x86 codegenerator to generate equivalent m68k instruction), but never maintained afterwards.

    Now that version 1.0 is finally out of the door, work continues on at least two versions:

    • one is pretty much the logical evolution of 1.0: no big structural changes, but lots of extra features like Delphi interfaces support (including COM/CORBA), a much improved optimizer etc.
    • the other one will include a completely rewritten code generator so it becomes as much processor independent as possible, with initial ports to at least the i386, PowerPC and Alpha (m68k probably too).
    The latter has still a loooooooooong way to go though.

    --
  • Well, these very features have been discussed extensively, and the consensus seems to be:

    • Multiple inheritance - there are very few cases where MI is actually usefull. In most cases where you have a MI based object model, you'll probably find if you look closely that it shouldn't be MI in the first place, but rather embedded objects.
      Besides which, the more recent versions of Delphi have strong support for interfaces, and the implementation of interfaces by automatic delegation to another object (see the 'implements' keyword), so if you really want MI it's fairly easy to implement.
    • Templates - It is unlikely this will ever be included in Delphi for the simple reason of compilation speed. Anyone who's ever compared compilation speed of comparable projects between Delphi and C++ will notice how much longer C++ takes. This is due, more than any other reason, to it needing to preparse all the files and expand any macros and fill in templates.
    • Operator overloading - this is something I actually do miss in Delphi, but the traditional position of Borland has been that it would do more harm in obfuscating code than it would provide benefits for.

    Borland has really made major changes to the Pascal syntax since the days of Wirth, so Delphi's language really is "Object Pascal" as opposed to just Wirth Pascal. One of the major strengths in Delphi is that it doesn't have to conform to a committee, so you don't have to wait for half a decade for cool new features to be included. ;-)

  • It seems to me that the main value for products that compete in the VB/PowerBuilder/Delphi space is a combination of components -- language, library (functions and objects, especially good database interface tools), visual painters for visual objects, and project management. This combination of features helps you prototype many kinds of common small to medium sized business applications quickly.

    The language is a small part of the overall value, and in for most kinds of business applications relatively unimportant. In fact, one or two components can be pretty bad, and the product still useful. It's how it all fits together.

    For example, Powerbuilder has a truly terrible IDE that obviously was conceived by marketroids with no real serious developing experience. Powerbuilder's scripting language (Powerscript) is even worse, if possible, than VB. However, PB is better than VB for many applications because it has really useful and highly reusable database interface/presentation abstractions called datawindows, and it supports pretty good subclassing of visual objects. VB's script editor, on the other hand, knows all about those pesky COM methods -- very useful at avoiding runtime errors since the lack of a CORBA style IDL means you can't catch calling non-existent methods at compile time.

    I don't know much about Delphi, but I suspect the language, while almost certain to be better than the junk ginned up by MS or Sybase, is a relatively minor factor in the reasons that people choose it. I think kudos are due to these folks for creating a free pascal, but without all that other stuff that surrounds a product like Delphi, there's little reason I can see to get excited about it. There are a great variety of very good free languages out there.

  • As a Java programmer, properties is something I really miss from Delphi. To some extent the JavaBean spec informally defines "sorta-properties", but it seems to be done in a really bungled language-external way.

    Every time I have to write setters and getters for all my fields I groan and think how easy it was in Delphi/Object Pascal to just apply an access policy to the field itself.
  • A compiled pascal CGI app (comes with a neat example in the docs), it has I think OpenGL support (or will have) runs on multiple OS's so a simple hack can be easily used cross platform. Much like you would a simple perl script without having to need all the proper libs installed or have ActiveState on your Win32 box.

    Still above all it serves as a learning application, and with Delphi out here in the real world. You can write a GUI app in Delphi for Win32, then reuse most of your existing code for linux or whatever OS.

    Plus it's here now to bridge the gap between Win32 and Linux and a public legal copy of Kylix ain't

    I see many uses other than just learning to program.

    -stakk-
  • What happened to that poor soul?

    Assuming the picture is real? Many months of reconstructive surgery, afterwhich I bet he looks almost normal. It's amazing what surgeons can do.

  • IIRC COM will be supported on Linux as a kind of subset of Corba.

    Not really; from the compiler's point of view there are only two differences between COM and CORBA interfaces:
    1. COM interfaces must be derived from IUnknown
    2. CORBA interfaces can be derived from several ancestors (some kind of multiple inheritance)

    COM consists of two parts: The IUnknown stuff, and a helper library. Translating the helper library to Linux isn't that many work, if only the really important part is ported.

    But of course it would be possible to provide a COM to CORBA wrapper, but Free Pascal won't see full CORBA support in the near future so we'll have to see...

  • You are right that the attraction of this kind of package is the combination of visual IDE, components and language. You are right that the VB language sucks,and PB is even worse.

    This is not unimportant to the programmers - it is a major part of why I will never touch PB or VB again with a bargepole, and why I like Delphi (I'm biased here, IMHO for a good reason)

    Consider that all the components that ship with Delphi are written in Delphi, and an install of Delphi installs the source to them. This means several things.

    1) The language had to be powerful. How many of of VB's components are written in VB? Was the VB IDE written in VB? yeah, right! All of Delphi's components are written in Delphi, and so is the IDE.

    2) You can extend it. Read the source, tinker with it, and you can quickly work out how to make your own components.

    So IMHO the the OP language is a large part of the total value proposition of the RAD environment, as it is a large part of that environment, and a major reason for it's success.

  • I remember back in school, I wrote my AI programs in Delphi. Easy GUI's to manage and "view" the neurons in my backprop neural net, to see generations in my genetic alg's... but the kicker is that Delphi had properly modeled visual components that used non-visual objects (for example, listboxes were just the GUI controls, but the nonvisual object was the StringList, which is very optimal and has no overhead).

    My classmates were pretty clueless about Delphi:

    Me: I've decided to the cat analyzer in Delphi...
    Otherguy: Isn't that a database language? Wow...
    Anotherdude: Dude, I heard you're doing your AI in Perl...

    Kewl thing was the fast compilation and no extra dlls (and headless operation... try *that* in VB).
  • I study in the Netherlands at the EIndhoven University of Technology and they als use Pascal for the first project ... but there have been some discussions that they should switch to a functional language because they'd like to first teach the students to reason about programming before teaching them bad habits in an imperative language. I thing they have a point there ...
  • Yeah, too true. Personally, I'm gonna go home, kiss the wife, and then read myself to sleep.

    Never gonna go to random fucker links ever again.
  • by DreamMaster ( 175517 ) on Wednesday July 12, 2000 @10:13PM (#937992) Homepage

    Delphi is the full-blown compiler, with which you can write a 10-table database GUI program in one day, where the final program will only be one .exe file (on Windows), that doesn't need special DLL's to be installed.

    Oh my yes. I can't count the number of times over the years I've installed a program only to have the message "Cannot find vbrunXXX.dll" pop up at me. One of the best things about Delphi is what it compiles is all you need to distribute.

    Well, in the case of your database program you would need to distribute the Borland Database Engine runtime system. But I still agree with your point. ;-)

  • Boring repetitive anonymous troll...

    Go code Lazarus in XLib and hack in Win32 compatibility after you implement font support.

    Luser!
    ---
    pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
  • by Frymaster ( 171343 ) on Wednesday July 12, 2000 @10:25PM (#937994) Homepage Journal
    In high school I was one year too early for pascal... got PL/1 instead.

    Knowing this was going to come down soon, I decided to head down to my local computer book store to pick up some guidance. My discovery? No pascal books. However I did find the following:

    1. "C++ for C programmers"
    2. "Java for C++ programmers"
    3. "Visual Basic for the Java Savvy"
    4. "From BASIC to VisualBASIC in 43 Days!"
    5. "Oh No, Pascal! A guide to Pascal for BASIC programmers" (discount bin)

    $250 later, I'm all set! Who says you can't leverage your skills in C in the modern programming paradigm?

  • think you wanted VisualBasic to Basic in 43 days for number 4.. which I doubt you'd ever get.. maybe some VB magazine has an "in the old days of BASIC" article that you can downgrade your VB knowledge to basic with so you can use book number 5 ;)

  • by Halo1 ( 136547 ) on Wednesday July 12, 2000 @10:38PM (#937996)
    FWIW, you'll find that the optimizer in 1.0 is probably not much better than in the previous version you tried. If you want to try the new optimizer, get an optcomplinux.tar.gz snapshot (from the development section of the website) and use that in conjunction with -OG3p3 or -OG3p3r)

    --
  • The Lazarus IDE it in pretty good shape, with quite a few developers working on the code (and I suspect that this article will help attract qutie a few other people as well).

    One of the things that we are in desperate need of is a good mirror of the Lazarus site. The main server site is pretty good... if it is up. With Free Pascal being slashdotted right now I'm sure that the Lazarus site has died if for no other reason than the total number of people who are logged on. Even the CVS server for Free Pascal has been slashdotted. If you can get onto the web site, there are some screen captures posted of some of the user interface, as it is currently developed.

    If you get on the CVS server for Free Pascal (in a couple of days after this traffic has died down a little bit) you can get the latest source code for Lazarus from the lazarus subdirectory of the cvs tree. I also got a couple of binaries I've compiled for Windows '98 that look pretty good.

    Lazarus is still in fundimental development right now with core visual components being developed (like the TForm and how we are going to store the equivalent of a dfm file is still up to debate in the mailing list).

    You can currently create apps using the command-line compiler and lazarus components, and the ability to drag and drop components onto a form is almost ready. As Lazarus is heavily dependent on GTK, development in the Windows environment is going to be strongly linked to the GTK development for Windows. In terms of Linux functionality, there doesn't seem to be any major problems. Just a lot of spit and polish.

    On the whole, this is a pretty good environment and in roughly a year or so I think you will see Lazarus take off and really do some neat things. They seem to have picked up the pieces of the old Medigo project rather well, and the fact that there is even a working protype and mock-up of the IDE interface successfully running should be considered a good sign. If you know Pascal or want to see a strong GPL'd GUI development system, stay persistant and try to get connected with Lazarus.

    There are also some strong connections between the Free Pascal developers and the Lazarus developers (with some people working on both), so if you keep a book mark on the Free Pascal site you should be able to stay in touch with Lazarus as well.
  • i agree...this would have been very useful for myself and other university of waterloo students who were told to program in pascal from about 1990 to 1997. now...who cares.
  • You are still plainly wrong.
  • Y'know, one of the first things I asked a PB booth drone years ago was whether PB was written in PB or not. He didn't seem to understand the question. When I carefully and slowly explained it to him, his reaction was, of course not!

    PB and VB are very useful for certain kinds of tasks, but not powerful enough for every kind of task. The thing about tools is that a well crafted, or even somewhat indifferently crafted special purpose tool will usually be more conventient than a more general purpose tool. Of course this is hardware-think, and doesn't cleanly apply to software.

    I think you clearly get my point of my question: if a programming tool is powerful enough to create itself, it is mutable to duplicate any kind of special purpose tool you need it to be. The question then becomes how much is prebuilt for you.

    The big problem with PB is that the user (the person who develops programs using PB) is a second class citizen. He doesn't get a language, a debugger, or project management tools as good as the PB developers get.

    So -- the question is then is how big a step is this freepascal thing towards creating a Delphi competitor?

  • Modula-2 is a *much* better language than Pascal will ever be.

    Ahhhhh, those were the days. Modula-2 on my Atari ST was awesome. Actually, I think my memory might be just a bit selective. I had to really work hard to get the compiler to fit onto two floppy disks, and that left just a small space to store source and object code. The compiler was just about the largest program that my Atari was capable of running. I envied everyone with a hard disk.

    On the other hand, I learned Pascal on a TRS-80 model IV, and the Pascal-80 compiler looked very very similar to Turbo Pascal 1.

    In my opinion, the ultimate Wirth inspired language was Turbo Pascal 4.0. Every feature of Modula-2 was in the language, plus it had a great development environment and compiler.
  • Delphi is fast, I'll give it that.

    But the code bloat is awful. Have you tried pressing 'run' with the default, blank project loaded? It churns out a 120K executable. Anything you add goes on top of that 120K. If you do anything with multiple forms, boxes, huge custom routines, added objects from other people, soon you're looking at 600K or more. The biggest executable it ever spit out at me was over a megabyte.

    By contrast, using Visual C++ the right way (ie, no MFC) gives you a smallest executable of ~5K. The biggest I've ever gotten it is around 150K, and most of that was bitmap resources. Sure, it takes more time, sure, you have to know what you're doing, but the benefits outweigh the drawbacks.
  • GNU Pascal and Free Pascal are quite different beasts:
    • GPC is written in C, FPC is written in Pascal (so Pascal programmers who don't know C can also understand the compiler internals and work on it). Furthermore are the compiler sources a really good test for the compiler itself.
    • GPC supports ANSI ISO Pascal, Extended Pascal and the Turbo Pascal dialect (they are working on integrating Delphi support too afaik). FPC supports the Turbo and Delphi dialects combined with several extra's (function/procedure/operator overloading for instance). GPC also supports some extra features, but I don't know which by heart.
    • GPC is built on top of GCC and uses libc, FPC is written from the ground up and has its own Run Time Library. The obvious disadvantage for FPC is that it isn't available for all architectures GCC runs on, the less obvious advantage is that we don't have to worry about any structural changes in GCC (it sometimes takes a few months before GPC is adapted if GCC is updated)


    --
  • by grahamsz ( 150076 ) on Wednesday July 12, 2000 @10:57PM (#938004) Homepage Journal
    I haven't really used pascal in a while but I do the bulk of my windows development work in Delphi and love it to bits.

    Sadly of late i've not had the time to actually get round to finishing prorgams properly but in delphi I managed to write a functional gnutella client (connected to servers & performed searches) in the space of one evening - and it was fully multithreaded and could maintain up to 255 server connections and as many searches at once.

    A few years back I worked for a company doing some win31 development in delphi and would have loved to have had a camera on me when I came back to my c++ coding superior on my second day of work to tell him i'd finished what he had reckoned would have been a 2 to 3 week project.

    Personally I can't see why there is so much fuss about c++.

    I think pascal is the Dr. Pepper of the langauges world :)

    Even that guy at work later became a convert.
  • by Halo1 ( 136547 ) on Wednesday July 12, 2000 @11:06PM (#938005)
    Since the main site seems to be pretty slashdotted already (and the US isn't even awake yet :), here are the mirror links (I've only added those of which I know for sure they have 1.0):
    • Austria [tuwien.ac.at]
    • Belgium [rug.ac.be]
    • Canada [darklands.cx]
    • Germany [uni-freiburg.de]
    • The Netherlands [tudelft.nl] (= ftp.freepascal.org)
    • FTP-only mirrors in Brazil, Turkey and the US: see the links section on your favorite mirror.


    --
  • by Lerc ( 71477 ) on Wednesday July 12, 2000 @11:07PM (#938006)
    There are four reasons I use Delphi and FreePascal over C++.(some only apply to FreePascal depending on switches)

    1. No object instance variables. This means all objects are by referance which means you know when you are creating destroying and copying objects.

    I wrote a base object in C++ once that reported when it was created and destroyed. I was horrified when I found out how many objects were created and destroyed automaticly doing relativly trivial operations. I resolved to only use pointers to objects in future in C++.

    2. Properties, Delphi properties rock.

    3. Published properties, There is no better way to support end-user visible properties of objects than in published properties.

    4. 10 seconds for a complete rebuild of a major project.

    Of course there are other minor things as well. virtual constructors, sets, nice string support, units instead of header files...

  • > It doesn't support - multiple inheritance, templates, overloading

    but not operator overloading. This is on purpose.

    IMHO operator overloading in pure syntactic sugar (ie there is nothing that you can do with it that you cannot do without it) and a licence to make bugs (I once spent days chasing a bug in a C++ program that was caused by some idiot's incorrect overriding of the pointer deref operator.

    If you want MI, rather use interfaces (in Delphi -not in FP yet AFAIK).

  • >Last time I heard, GUIDs in class interface
    >declaration are windows-only-registry-dependent
    >thing

    They are not. A GUID is just a unique identifier. Yes, Microsoft use them to distinguish between COM interfaces. But that has approximately zero implications for interfaces and use of GUIDs in interfaces.
  • I would love to try writing some KDE applications, but I have to admit that C++ is too hard to learn for me and makes simple things difficult to do (for me). Is there a technical possibility to write bindings for these toolkits for FPC?
  • >it is less productive,

    Hmmm. I am much more productive with Delphi Pascal than with C or even C++. The reason?

    It compiles faster. I find problems earlier.

    >and you are limited

    Limited? The only thing that I haven't done with Delphi Pascal is write a Windows NT (or Windows 2000) kernel mode device driver.

    Sorry, but for me there is no limit (neither in C, C++, or Delphi Pascal).
  • Agree. Delphi is simply brilliant. I hear people saying that Pascal is "old". This implies that newer is better, which is not necessarily true. Whenever I need to write a quick and dirty program, I fire up good old Turbo Pascal, and I'm a lot more productive than when I have to remember the confusing syntax of C++. Besides, C++ is hindered by its compatibility with C (can you spell "memory leak"?). Although Java is beginning to contend for my language of choice nowadays...
  • >Pascal is one of those languages that is great
    >for teaching the basics of programming.

    This is a common misconception.

    The "old" Pascal you (and most others when they are talking about Pascal) are referring to is plainly dead. It's ugly. It's useless.

    Modern Pascal dialects - and Borland's Delphi Pascal is very much up-to-date and modern - are very productive tools and go far, far beyond any basics.

    Using (Object/Delphi) Pascal as a beginner language? I wouldn't do that. Python (http://www.python.org/) is the better suited language: Interpreted (hence instant gratification), modern concepts (functional and imperative elements, introspection), readable (can you spell Java?). Of course Python is not the best thing since sliced bread, but the combination of Borland's Delphi Pascal and Python *is*.
  • Actually, FPC does support operator overloading (but not yet as part of a class definition). Interfaces support is indeed not yet there, but we're working on it/

    --
  • Leave, and go to a site like kuro5hin, where submissions are voted on by the users of the site.

    Personally I read both slashdot and kuro5hin.
  • >Templates - It is unlikely this will ever be
    >included in Delphi for the simple reason of
    >compilation speed.

    That reasoning is wrong and that reasoning has been ripped apart often enough.

    You think of templates in terms of C++. Templates are "just" a form of genericity - and compiling for genericity doesn't HAVE to be slow.

    >One of the major strengths in Delphi is that it
    >doesn't have to conform to a committee

    Well, it's the in-house commmittee, and that committee is very much committed to a clean, productive language.
  • by bugger ( 101595 ) on Thursday July 13, 2000 @01:34AM (#938016)
    >I came across Gnu Pascal Compiler.
    >I don't see any reasons for another one

    GPC does not seem to serve any useful purpose. It is dog slow to compile, it supports Pascal dialects that were in use a decade ago, but nothing that is up-to-date and modern.
  • A 30GB drive costs something like $190. That is 30,000 MB And you are worried about an executable that is 1 MB in size?
  • Do you have Java experience? I'm curious because much of what you describe sounds like a description of Java. How do the two languages compare?

    When I first learned C++ I liked it, then as I learned more I began to love it, now that I have lots of experience in it I hate it.

  • Wasn't there something about a PASCAL programmer knowing the value of everything and the Wirth of nothing?

    Thank you.

  • You gotta be kidding me. I post an article as #18, the first person responding to a serious question about the purposes of this language, after reading page after page of crap from the trolls, spammers, and dickheads that come here, and my post gets modded "Redundant"? That's it, I'm trolling from now on.
  • I work for a large financial data provider and most of our central database code is written in Pascal.
  • GTK bindings are included and most example programs have been translated to Pascal as well. We don't have Qt bindings yet, but if Kylix includes them (since Kylix uses Qt by default), you should be able to use them with FPC as well.

    --
  • Actually, not supporting multiple inheritence and C++ style templates are two of the things that I think count in the favour of FreePascal.

    I think there is room for a Template system I just don't like the idea of a template system that has the power to chuck type checking out the window.

    Something where you could define a template and then have a line required to activate it

    for instance if you have a swap(TypeA,TypeA) template then to be allowed to use it on Integers you need something along the lines of

    Allow Swap(Integer,Integer);

    This way You don't run as much risk of creating a new function from a template by mistake.

  • Well for the DBE, you can use a ODBC component instead (like the free mODBC or some other paying ones). They integrate flawlessly with other Delphi DB components and you can then distribute the .exe alone (since all Windows installs come with the ODBC API)
  • by Anonymous Coward
    Why don't you use gcc as backend? It is already ported to almost any architecture under sun. (And how do you want support COM under non-windows oses? Last time I heard, GUIDs in class interface declaration are windows-only-registry-dependent thing).
  • The whole MacOS and MacOS apps used to be coded in Pascal, not C. OK it was in the 80s, but still, that would cound as a (very) large project. Borland has sold hundreds of thausands of copies of Delphi, so I bet many apps (including very big ones) are still written in Object Pascal.

    The only reason (almost) everybody use C (or C++) is the same reason (almost) everybody uses Windows : it is the standard. Nobody seems to care that it really sucks.
  • There are lots of alternatives to using the BDE including some decent VCL ones.

    BDE Alternatives [kylecordes.com]
  • And what's the point of that? If you only want to store COMPARABLE and its descendants you don't need templates. You can just write the class for COMPARABLE.

    ___
  • I use a tool named DBISAM, which compiles into the .exe file, so my database software is only one .exe file, they often even create the database structure themself.

    I made an open-source calendar system for small companies. It's not GPL (Delphi programs cannot be, yet), but you can look at the source, how it is possible to make this database program stay within just one .exe file:

    http://giga.dybdahl.dk/download/kalender/

    Just download kalender.exe, store it in a new, empty directory on a network drive, give everybody in the company a Windows shortcut to the .exe fil and you are up and running.

    If Free Pascal could compile this, I would release it under the GPL.
  • Free-pascal is a great clone of the Delphi compiler - with a handful of nice extensions.

    For those doubters out their, Object Pascal (which is what Delphi and FP are) is virtually interchangeable with C++ and Java. Delphi compiles real quick and produces very tight code - more than can be said for a lot of C++ programs.

    There are some great things like properties (concise and orthogonal ways of using get/set methods or data members) which help decouple the implementation, and the in-built meta-class and RTTI is very useful. Constructors are treated like first class methods - so you can easily reinitialise existing objects without having to recreate them.

    There are things that suck - I hate having to predeclare all my variables, but otherwise it does things a properly grown up Object based language should.

    There are a handful of language extensions which should go into FP:

    interfaces
    interface forwarding (delegation)built-in threading (under consideration)
    extended RTTI - along the lines of Java reflection.

    If these features go in, then we'll have a fast object based, cross-platform language with excellent component development features.

  • Why don't you use gcc as backend?
    FPC started out as FPK-Pascal, written by a German student for personal use because he didn't like the fact that Borland wouldn't produce a 32bit Pascal compiler (somewhere in 1995). He looked at GPC, but didn't like it because it was written in C, so he wrote his own compiler in Pascal.

    I think the main reaon we stuck to our own code generator in Pascal and didn't switch to gcc is because

    • it works fine
    • this is a hobby project of ours and we like tinkering with low level stuff too
    • we're not dependent on any other project. GPC uses GCC and they sometimes need quite a bit of time to adapt GPC when a new version of GCC comes out
    • if there is a bug somewhere, it's in our code and it's much easier to debug your own code than someone else's (plus that you don't have to determine in whose code the problem lies).

    And how do you want support COM under non-windows oses? Last time I heard, GUIDs in class interface declaration are windows-only-registry-dependent thing
    I don't think it's the intention to take COM support cross-platform. If you want cross-platform code, user CORBA. If you want to use things like Direct-X, Active-X etc however, COM support is very handy/necessary.

    --
  • One of the big differences between Delphi's Object-Pascal today and C++, is that Delphi's pascal language has evolved over time, becoming better and better. Delphi (and Free Pascal) is to old Pascal what Microsofts new C# is to C++.

    C# and Borland Pascal were even designed by the same guy - Anders Hejlsberg. But Inprise is independant - Microsoft is not. That's why Delphi is still better than C#.
  • C++ is a standard, and that is the main reason why it is used to widely. The fact, that C++ means high development costs often don't matter, because development costs are often just a small part of the total expenses in a company.
  • Multiple inheritance - there are very few cases where MI is actually usefull. In most cases where you have a MI based object model, you'll probably find if you look closely that it shouldn't be MI in the first place, but rather embedded objects.

    bull shit. I have worked on projects where MI is extremely useful. Replacing it with embedded objects would be extremely ugly.

    Templates - It is unlikely this will ever be included in Delphi for the simple reason of compilation speed. Anyone who's ever compared compilation speed of comparable projects between Delphi and C++ will notice how much longer C++ takes.

    Now this is a completely clueless statement. You are saying that a language should not include an extremely useful feature just because of increased compilation speed? Good one!
    ___

  • Pascal was the second langague I learn back in the day. It was used as a good teaching tool for the time. Now, why bother ? Pascal is pretty much dead, but people can tring to bring it back to life. I life teaching something like Perl would be more of benift. It can be used for virtually every type of program. (except for the preformance problems.)

    Its kind of like basic. Why if think of it ? I think a great deal of programmers started out here. Can basic be used for any serious program ? No. Unless you are using visual basic which has some nice parts to it, its a waste of time.

    If you are planning to develop an application, what do you think of first. Its certainly not basic, pascal, cobal or fortran.

    It just does not make any sense to beat a dead horse...


    until ( succeed ) try { again(); }
  • ...Let's rewrite the Linux kernel in Pascal!

  • I'd really like to see what Lazarus is up to as a project - does anyone have any clue where it's at, as I can't seem to get through to the web site I was using a few months ago:

    http://www.lazarus.freepascal.org/

    Of course, having a release of FreePascal is still very cool on its own right, but I'd like to see where the IDE is up to as well...
  • by pb ( 1020 ) on Wednesday July 12, 2000 @08:45PM (#938039)
    I'll have to try it out again...

    The first language I really learned how to code in was Turbo Pascal, somewhere between 5.5-7.0; I probably spent three years in high school just playing around with it, and I'll eventually work some more on BGI/SVGALib(/SDL?) portability. :)

    (BASIC doesn't really count, since they didn't give me *real* subroutines for so long, and was interpreted or produced really crappy executables...)

    My experience with FreePascal (or fpk-pascal) before was, although it often offers better compatibility than p2c, I'd still rather use gcc as a back-end. I never got dynamic libraries working, and I had problems porting some of my code due to apparent bugs in writeln(), (hopefully their fault, and fixed by now) and busy-wait loops (surely my fault, from programming for DOS--processes? What are those?).

    Also, I wasn't too impressed with the optimizations FreePascal does, but I suppose if I give it some time, it'll get better. It does some simple things really quickly, but I saw at least a 33% speed-up not too long ago in some tightly-nested code I was hacking on just by using p2c+gcc instead....

    However, for people still looking for a free Pascal language for DOS, FreePascal is a god-send, and the Linux portability can't hurt. :)
    ---
    pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
  • I've played around with Pascal a bit, and haven't seen any particular advantages over C++, aside from the traditional academic usage, and I think I'm a bit beyond that now. Still, I'm very interested in Delphi, and a lot of my friends swear by it, but I've been too lazy to try it out. Now I know where to get it. Thanks people!
  • okay... this a real flashback to school. (though at UCSB they phased out Pascal fro Java while I was there).

    I guess my big question is, what will people use this for? I imagine it is still great to learn on... but is it really viable for large scale production. I used it to develop simple grade calculation, and Turbo Pascal's BGI to do little loaders and appz programs. Anybody using for anything useful, though?

    I'm a Player [playtons.com]
  • by Bruce Perens ( 3872 ) <bruce@perens.com> on Wednesday July 12, 2000 @08:56PM (#938061) Homepage Journal
    In their web page they say they are using a "modified GPL" to allow the use of static libraries, but all I see with the sources is the GPL and the LGPL (which I guess counts as a modified GPL). Am I missing something? I didn't take a long time to look around the sources.

    As far as I can tell the LGPL is fine for their purposes and poses no problem to commercial projects (which they seem to be a bit confused about in one of their README files).

    Thanks

    Bruce

  • Looks like they assume linux=ia32/linux... Is there any support for other platforms, like ppc or the alpha? Of course, the generated code would either be very slow or not do exactly the same as the original code on the alpha, since the popular WORD/INTEGER 16 bit values just don't work nicely on a well-designed RISC architecture.
    Too bad. I was hoping to port some of my older programs, but it looks like Turbo Pascal code is still not sufficiently portable.

  • People still use Pascal?
    A lot?

    I'm shocked...seriously, I'd be really curious to hear if anyone specifically knows of any large projects in recent time that have written in Pascal?

  • Well, aside from the fact that Delphi and Pascal FORCE you to write better code (something despised by many experienced programmers who often refer to Pascal as a B&D language) there actually *have* been large scale production programs written in Pascal!

    For those of us who grew up programming in the BBS days, we'll remember that many popular BBS packages were written in Pascal (which is exactly we learned Pascal as our first "real" language). Among them: WWIV (and its derivatives such as T.A.G., Telegard, Renegade, JRBBS, etc), QuickBBS, RemoteAccess, WildCat, etc...

    In order to share data structures with these programs, external utility or door writers would have to do them in Pascal or be faced with writing stupid conversion routines that turn Pascal fixed-length strings into C null-terminated strings and turn certain other Pascal types into their C counterparts....

    Ahhh...those were the days... :)

  • by Anonymous Coward
    little_endian != good_endian;
    big_endian != good_endian;
    good_endian == dead_endian;

    The only good endian is a dead endian...

  • FreePascal's compiler is written in Pascal. Does that count as a large project? ;)

It is much harder to find a job than to keep one.

Working...