FreePascal v1.0 Released
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.
← Back to Stories (view on slashdot.org)
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 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
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. Someone please please make an RPM out of this!
Steve Magruder, Technopolist
Steve Magruder, Metro Foodist
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
:= Foo.Bar + 1 is internally translated to
This is true.
Foo.Bar
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.
My Karma: ran over your Dogma
StrawberryFrog
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...
"I'm looking through you, where did you go?"
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.
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/
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. Of course most of it was inline ASM...
my sig's at the bottom of the page.
>> 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
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
--
Donate free food here
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).
--
Donate free food here
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) 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.
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.
.exe file (on Windows), that doesn't need special DLL's to be installed.
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
Geez....we just got done freeing Mitnick and now we gotta free Pascal? When will this end!?
"My religion is to live --and die-- without regret." -- Milarepa
--
Donate free food here
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's 10 PM. Do you know if you're un-American?
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.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
...more like ignorant and proud of it.
.. has some nice parts to 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
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.
My Karma: ran over your Dogma
StrawberryFrog
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
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.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
With a name like FreePascal, couldn't the "release" have waited until Bastille Day?
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...
--
Donate free food here
Use bar or atm instead...
We've lost cabin pressure...
/Droid
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.--
Donate free food here
Well, these very features have been discussed extensively, and the consensus seems to be:
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.
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.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
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.
It's 10 PM. Do you know if you're un-American?
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.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
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...
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).
Make sure everyone's vote counts: Verified Voting
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.
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
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.
pb Reply or e-mail; don't vaguely moderate.
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?
2 1337 4 u!
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)
--
Donate free food here
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.
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.
If tits were wings it'd be flying around.
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.
this is a sig.
--
Donate free food here
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.
--
Donate free food here
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...
-- That which does not kill us has made its last mistake.
> 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).
My Karma: ran over your Dogma
StrawberryFrog
>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).
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.
Matt. Want XML + Apache + Stylesheets? Get AxKit.
>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.
>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.
Scuttlemonkey is a troll
Wasn't there something about a PASCAL programmer knowing the value of everything and the Wirth of nothing?
Thank you.
Scuttlemonkey is a troll
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.
Karma: Dyn-o-mite!(mostly affected by Jimmy Walker reading your comments)
I work for a large financial data provider and most of our central database code is written in Pascal.
The obscure we see eventually. The completely obvious, it seems, takes longer. - Edward R. Murrow
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.
-- That which does not kill us has made its last mistake.
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
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.
___
___
If you think big enough, you'll never have to do it.
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.
.exe file:
.exe fil and you are up and running.
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
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
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.
I think the main reaon we stuck to our own code generator in Pascal and didn't switch to gcc is because
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.
--
Donate free food here
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.
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!
___
___
If you think big enough, you'll never have to do it.
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(); }
until (succeed) try { again(); }
I don't think so, but I really am not sure (I'm not into Windows nor into Delphi style programming, so I'm not the best person to answer this :)
I think some basic COM stuff will be supported on other OSses, at least IUnknown and the most important COM library interfaces. Full COM support won't make very much sense; as you said, CORBA is a much better replacement.
...Let's rewrite the Linux kernel in Pascal!
This is an EX-PARROT!
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...
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
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.
pb Reply or e-mail; don't vaguely moderate.
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!
WARNING: there is a trojan on your
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
During my previous year at uni we were taught Pascal through Delphi. Thanks to the Linux port of Freepascal, I was able to work on my work after the library closed and only a few small alterations were needed to get Delphi code to work under it. It proved so good I've now recommened that friends thinking about buying Turbo Pascal try this first...
Pascal is a great language for students. It's simple, straightforward, linear, and it teaches the basics needed to become a semi-decent coder. Having a current free version makes this an excellent choice for schools, who need an entry-level language like this but don't feel like paying for licenses.
Besides, Drug Wars was written in Pascal. =]
Karma: Dyn-o-mite!(mostly affected by Jimmy Walker reading your comments)
Eiffel has this, they call it constrained genericity, which just means that you can specify that the template parameter must be a particular type or a decendant of that type.
e.g. Instances of this array class:
class SORTABLE_ARRAY [S->COMPARABLE]
can only store COMPARABLE objects (or objects that inherit from COMPARABLE).
--
Donate free food here
Sorry, my foul-mouthed chum, but Drug Wars really is an important hit^H^H^Hbit of software to be discussing. Now go put on some Bob Marley, smoke a joint, and relax.
You are in the wrong thread.
Yes, they do. One previous employer of mine has developed their entire front-end for an ERP in Delphi - dozens, maybe hundreds of sophisticated GUI modules. About 50 Delphi programmers have been working for 3 yrs on this one ...
I know Reuters here in London still have enormous amounts of Pascal code they maintain and enhance.
Great Windows SFTP Server!
In the full example, SORTABLE_ARRAY specializes, by inheritance, the plain generic class ARRAY, adding a sort method.
So, the point of it is to specialize existing generic classes.
Are there any GUI's available to Pascal? Back in the days of TurboPascal 7, I don't remember any, except for Borland's proprietary DOS-based TUI (which I can't think of the name at the moment). Anyhow, if there were a GUI available (Tcl/Tk perhaps?), then I'd be able to use Pascal for serious programming functions at work, instead of just for command line programs/utilities.
Alex Bischoff
---
Alex Bischoff
HTML/CSS coder for hire
You should know that some non-trivial usages of templates quickly lead to types you can't be bothered to spell out. Ever seen an error message from a C++ compiler? For a program that uses STL? Thanks but no thanks. I'd be very unhappy if C++ included such a "feature".
What's the point of this "allow" declaration anyway? Does it lead to more correct programs? If not, it is not needed.
has the power to chuck type checking out the window.
What planet are you from? C++ is not exactly a typesafe language, but not because of templates.
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
Bruce Perens.
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.
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?
But seriously, the problem with Pascal is that the language is too restrictive. Java is similar in its strong typing, but it has more elegant syntax --exceptions are good ways of handling problems. And some things are just crazy--why type begin...end when { } suffices?
Another problem is the inability to link to libraries. Sure, there are ways of doing it, but it tends to be extremely proprietary and non-portable.
That's not to say Pascal isn't useful--I grew up on Turbo Pascal (a much better first language than {GW/Q/Visual}-Basic). But then I learned C.
This isn't intended to be a flame. Pascal has its uses, and it's a good learning tool. But I can't imagine anyone in my company (I'm a C++/Java programmer) doing any serious work in Pascal.
"It's better to keep your mouth shut and be thought a fool than to open it and remove all doubt."
In the 1980s C was in ATT UNIX which was nearly
free and open source at universities.
You had to buy most versions of Pascal.
No need for rude comments. You'll notice that I didn't say *all* circumstances. It's understandable you may happen to be passionately for MI; there are certainly enough Delphi programmers who feel the same way, which is why we have flamewars on the subject in the first place. All I'm saying is that frequently, what you think may be best represented by a MI style can just as easily be represented by embedded objects or an overall container wrapping around several objects.
No, I'm saying that when adding new features there needs to be a balance between the aedvantages that the new feature will provide, versus the cost of implementing it. If the addition of templates caused Delphi, for example, to double the compilation time for general projects, then I for one would consider that "enhancement" to be worthless.
However, a previous poster was right in pointing out that I was focusing too much on C++ style templates - as long as Delphi implemented templates in a manner that didn't require a preprocessor to go over the source code first, there shouldn't be any reason, speedwise, why Delphi couldn't include templates.
FreePascal's compiler is written in Pascal. Does that count as a large project? ;)
Weapons of Mass Analysis