Free Pascal 2.0 Released 451
Eugenia writes "After five years of development, Free Pascal 2.0 is ready and it includes support for many architectures and OSes. It now has threading support, interfaces, widestring and better Delphi support among many other new features. OSNews posted an article introducing the updated GPL compiler." petermgreen adds a list of some of the major changes since the last stable release: "Much better support for Delphi language features (especailly method pointers); more supported CPUs (AMD64, SPARC, PPC (32 bit), ARM) and platforms (Mac OS classic, Mac OS X, MorphOS, Novell Netware); a new and better structured Unix RTL Threading support; and a large number of internal changes including rewriting large parts of the compiler to make it more maintainable and easier to port to new architectures," and notes that "Visual parts of Delphi are being handled by a seperate project known as lazarus, which has not yet reached 1.0 but should do so fairly soon."
awesome (Score:3, Insightful)
Re:awesome (Score:3, Interesting)
if so and the verbosity and case insensitivity don't bother you then it will probablly suit you.
Re:awesome (Score:5, Insightful)
Since it's a B&D language, you won't get buffer overflow bugs & exploits. (In and of itself, that's a mighty good reason to use Anything But C.)
Since it (well, Turbo Pascal did, so I guess Delphi does, too) knows how long strings are, there's no need for that silly necessity for null-term strings, and all the consequent bugs.
But... since it's a B&D language, there will be other gotchas to struggle with.
Re:awesome (Score:2)
what i really like about it is that it has that friendlynees and ease for most code yet there isn't too much getting in your way when you want to do low level stuff.
Re:awesome (Score:4, Informative)
http://www.jargon.net/jargonfile/b/bondage-and-di
Re:awesome (Score:2)
so it gets in the way just enough to make it hard to fuck up by mistake but when you really want to do something the compiler wouldn't normally allow its easy to force.
Sometimes B&D is good ! (Score:5, Informative)
I did a whole lot of programming in pascal as a hobby many years ago, after moving from it in Basic. Since that time, I've learned C, although I haven't done anywhere near as much programming in it, partly because I lost interest in programming in general - I've found a few other IT related things that have interested me more eg., networking.
I like C a lot, as it allows you to break a lot of "general" programming the rules. However, I think it is a terrible language to learn programming in, because it doesn't enforce general programming rules that should normally be followed, unlike pascal.
After you've learnt the rules of programming in a language such as Pascal, you can usually break the rules in C relatively safely, because you realise when you're stepping across the line, can work out what the consequences will be, and how to do it safely.
Of course, you're still being a bit naughtly, and, the D you deserve will need to be sort from some other source than the programming language you're using :-)
Teaching vs. Industrial Use (Score:5, Interesting)
BASIC: self-taught including line numbers and even *shudder* edlin once one a random computer in elementary school, plus a year of high school. A wonderful language to learn with.
Pascal: a dead language. Why the hell are people still using it? Whatever, I learned it in two years of high school, learned about pointers and trees and ADTs. Since it was DESIGNED as an educational language, NOT as an industrial language, it was great to learn with.
C/C++: should die, except for programming kernels and hardware libraries. But I learned some of it in the last year of high school, and more in college. Great language for low-level manipulation and byte-counting accuracy (that's C only, not C++).
They're trying to teach my brother basic computer science at UT Dallas by using Java. And not just Java, but Swing. It is a wondefully powerful language, just like C, and it has native threading, exceptions, and class extensions, so it blows C++ out of the water. But it is a horrible language with which to teach computer science. Horrible, horrible, horrible, even more so than C. My brother didn't know what a 'class' was, and they wanted him to use Java! Give me a break, and him, too.
Once I got to college, I learned Haskell, then Python, PHP, a little JAVA, LISP, and assembly (okay, assembly for a simple machine). Haskell kicked my ass. Want to know why? Because I already 'knew' how to program. What I 'knew' was the suspension of disbelief required for working in the imperative programming world. Haskell is a great language for teaching people who do NOT know programming at all. My suggestion: start with Haskell, then move to Python (which is like BASIC in that it is interpreted and has a sparse syntax).
Why do we have to make it hard on people during education? We should use Haskell, Python, Pascal, or BASIC in order to teach them. And why do we have to make it hard on ourselves as programmers? We should not use Pascal or BASIC for anything, and we should use other languages for what they are good for.
And what is C good for? Explicit control and direction. Pascal? Nothing in the industry. If you're going non-standard (i.e. not C/C++), and you need absolutely enforced types, then byte the bullet and learn Haskell. Here, I'll make it easy for you: I've actually written a tutorial about Haskell for people who know languages like C [haskell.org] (including Pascal, Perl, Python, PHP, etc.). If you know any of those languages, and you want to learn a better, simpler, more free way , please check it out. I made it just for you, really! Oh, just so I mention it, it's fairly easy to call external code from Haskell, so you can still be naughty if you need to.
Thanks for the walk down memory lane.
Re:awesome (Score:3, Informative)
Borland dialects relax the B&D aspect, but keep the overal sane structure.
Everything done in C can be done in FPC, the only practical thing I can think of is that with C you can make large static datastructures easy using preprocessor.
However using an external preprocessor is of course possible with any language.
Re:awesome (Score:2)
I'm going to take a look. I'm sure it, like every other language, will have shortcomings, but I agree with another poster, you can't have enough development tools.
Re:awesome (Score:3, Informative)
Pascal s
Out of curiousity... (Score:5, Insightful)
Re:Out of curiousity... (Score:2, Informative)
Re:Out of curiousity... (Score:2)
Python can piss you off sometimes with the forced whitespace...
Re:awww (Score:4, Funny)
Royally hose the system?
Re:awww (Score:2)
program forkbomb;
uses baseunix,unix;
begin
repeat
fpfork;
until false;
end.
Re:awww (Score:2)
for(;P("\n").R-;P("|"))for(e=3DC;e-;P("_"+(*u++
Re:awww (Score:2)
Re:Out of curiousity... (Score:5, Insightful)
Re:Out of curiousity... (Score:2, Interesting)
Re:Out of curiousity... (Score:2)
I remember getting my first copy via sneakernet.
Re:Out of curiousity... (Score:2)
I know of one product, a flight planning and maintenance tracking app for small aviation businesses, that's still written entirely in Pascal. They guy who wrote it has been trying to convert it to C++, but has so far been unsuccessful. It's a terrible crawling horror of a program. It is, at least, Y2K compliant.
Re:Out of curiousity... (Score:3, Insightful)
Re:Out of curiousity... (Score:3, Interesting)
That's because most programmers aren't artists and reuse whatever came with their IDE. Try Ultra Fractal [ultrafractal.com], it might surprise you.
My rule-of-thumb to tell Delphi programs is (apart from using Spy++): when you right-click on a Delphi app's tab in the taskbar, you get only a Restore/Minimize/Close menu, not the usual Windows-standard Restore/Move/Size/Minimize/M
Re:Out of curiousity... (Score:3, Informative)
afaict the reason why they did it this way was for the delphi IDE itself. try loading the delphi 1 ide on a version of windows with a win95 like shell and you will get a flood of taskbar buttons. The one taskbar button approach worked better for thier ide and presumabbly for other apps that used forms in a similar
Re:Out of curiousity... (Score:5, Insightful)
Might not be as many job opportunities out there for a Free Pascal programmer, but for some who want to walk down memory lane...
Re:Out of curiousity... (Score:3, Insightful)
I have no idea what the strength of the language is, but I do know that Pascal is a Context Free Grammar [wikipedia.org] language. That what gives it an incredible compilation speed, but it also automatically means that it has very basic semantics compared to other languages in general and to C in particular.
Re:Out of curiousity... (Score:3, Informative)
also the delphi IDE was one of the few rad environments that could compare to the development speed of VB imo.
Re:Out of curiousity... (Score:3, Insightful)
Re:Out of curiousity... (Score:5, Insightful)
Too bad, the lack of support killed it. The ISO version was absolutely unusable, as described in many essays ("Pascal considered harmful", etc). Turbo Pascal was a powerful tool, but it's lost in the mists of the past now.
GPC can't be considered anything but sabotage (its developers intentionally break things like record types and stick with the broken ISO "standard"), and Delphi went into an insane streak of badly-designed hacks.
Pascal is probably the best language for learning algorithms theory, too. Unfortunately, I would say that it's too late to try to revive it. There is too much C code to make the switch worthwhile to a language that is pretty much an equivalent of C.
Re:Out of curiousity... (Score:3, Interesting)
Pascal was slaughterd in the iso standard ( though still a very beutifull language) Its the language i cut my teeth on before moving to C and i have alot of respect for it
I don't think it would be imposible to resurect as pascal tends to be very freindly to new developers as it is very strict so errors are easy to discover.
it just needs a buzz application to attract people towards it (note that in germany it is still used as
Re: Pascal considered harmful (Score:2)
R e a l - M e n - D o n t - U s e - P a s c a l [practical-tech.com]
Re:Out of curiousity... (Score:2)
Re:Out of curiousity... (Score:3, Informative)
most of the nonvisual components from delphi are there in some form. Visual stuff is being handled seperately by the lazarus project.
Education (Score:5, Insightful)
Pascal offers a good balance, forcing you to think about what you are doing, not merely how you are going to go about doing it. A lax style is often picked out by the compiler, and errors are often easier to see and correct.
The greatest advantage of Pascal, though, is that it is NOT used much in the workplace. This may seem odd, for something you're going to teach with, but think about it. It means that most people will be starting off fresh, rather than with bad habits, and means that you are learning about programming, rather than learning about some specific job. Jobs come and go, but software engineering will always be there.
Learning a skill for a specific job is only useful as long as that job is around. For example, if you learn Visual Basic today, you're market fodder if those jobs run dry by the
Re:Out of curiousity... (Score:2, Funny)
Wrong way (Score:2)
Closer to the other way around. Although Pascal does lack such "features" as allowing you to access arrays out of range. As the old saying goes, C gives you just enough rope to hang yourself, and C++ gives you 5 extra feet.
Re:Wrong way (Score:2)
Re:Out of curiousity... (Score:2, Funny)
Re:Out of curiousity... (Score:5, Informative)
Yes, I do use C++/Objective-C (when I have to program in OS-X with the Cocoa framework), and C# and Java. The productive gap I fell between the two first C-like languages is that, in Delphi, the work is done in a tenth of the time, specially for GUI and Database-enabled apps. When compared with Java and C# I would say that the time spent is twice or three times lower in Delphi.
Of course, the fact that I develop mostly in Delphi makes easier to me to be productive in this language. But I have a friend who went to work in a full-Java environment, being good at it to the point of being a lecturer, and he agree that the Java world is still way behind when it comes to RAD.
Having said all of this, many windows applications are built in Delphi. Here's [wikicities.com] a list of only the most famous.
Delphi is generally considered the best tool for development in Windows. Simply put, its strengths are:
Re:Out of curiousity... (Score:5, Insightful)
I'm a big fan of Delphi too. I have experience in using lots of other development environments for Windows, and Delphi is simply THE best possible tool for Windows development - especially if you are working in a big development team.
I really believe that once a programmer knows the ins/outs of Object Pascal (the language used by Delphi) he/she can be more productive than in any other language for Windows. Unfortunately many developers never get to that stage. This is of course a problem not exclusive to Delphi - It seems like in many courses for "Visual" languages all the time is spent on learning how to make nice looking forms, and not enough on the core language and proper OO programming - be it Basic, c# or whatever - but I digress.
Another interesting fact - Java may look like C++, but if you look a bit deeper it has a lot more in common with Object Pascal. E.g. All objects are references, there is a single base class from which all other classes are derived etc. I've seen that because of this it's much easier for a Delphi developer to become a good Java developer than it is for a C++ developer to become one. A new syntax is easy to learn - a new programming philosophy is harder.
The only reason that the use of Delphi has not become more common seems to be Borland's bad marketing. I once read a editorial in a Delphi magazine where the editor lamented about this. His conclusion was something like this: "It seems that Borland decided let's develop the best tool out there for Windows development, and then keep it a secret"
Re:Out of curiousity... (Score:3, Informative)
My thoughts on Pascal (Score:3, Interesting)
Trivia: The original Macintosh System Software (later renamed MacOS, later renamed MacOS Classic) was written mainly in Pascal, with assembler where needed for speed or low-level implementation.
I doubt much new, interesting work is done in P
Re:Out of curiousity... (Score:2, Interesting)
Delphi's indent size seems to be random, and there's just alot of handy settings I'm missing out on.
A gripe I have with the GUI designer (which is probably a Windows thing) is that randomly placing components around a window makes it hard to group and line up things. (as opposed to GTK+, which is pretty much the only o
Hysterical Rasins (Score:5, Informative)
"...randomly placing components around a window makes it hard to group and line up things..."
I think they expect you to use the alignment tools to fix that up. Like you say, Windoze background. The idea of having software arrange your widgets/controls for you is too foreign.
"...every expression is terminated with a semi-colon, like C, except for the last one in a code-block, which is optiona."
Not quite. In C, semicolons are, indeed, statement terminators. In Pascal, they
are statement separators. That's why you see the behavior you do. For better or worse.
Like you, I took to putting semicolons at the end of most things. I solved the IF problem by using BEGIN/END blocks nearly everywhere. It can be argued that is the right way to go in the long term anyway. Remember, Pascal is designed to encourage good programing practices, and sometimes that increases the short term effort required. Sure, newer languages like Python do a better job, but building Python on the hardware of 30 years ago wouldn't be practical.
"Furthermore, blocks start with 'begin', and end with 'end'. That's alot of characters to type... "
That's why God invented macros.
"Finally, a unit is split up in sections like 'interface', 'implementation'."
Turbo Pascal (the ancestor to Delphi and Object Pascal) created units as a way to easily define libraries. You created an "interface", which was the published API for the library -- kinda like a C header file. The "implementation" was the code (like the
"Why aren't these simply blocks?"
Mainly because they function at a higher level then the normal lexical scopes that BEGIN/END define. In particular, you can define globals that are part of the implementation only, or are also published in the interface.
"And why is the unit itself some sort of half block terminated with 'end.'"
A Pascal program begins with "PROGRAM Foo" and ends with "END."; the Unit syntax just follows suit. No BEGIN was used for the global scope. I expect it's mainly because the "PROGRAM" (or "UNIT") implies you are starting; it also means BEGIN/END are only used to create lexical scopes. The period at the end just signifies the end of the program, same as with an English sentence. It fits Pascal's general approach of trying to provide redundency for safety.
"It's all a matter of taste in the end."
Absolutely.
Question (Score:4, Funny)
Ahh Pascal (Score:5, Interesting)
Re:Ahh Pascal (Score:2)
Actually, it was kinda the same for me... it got used to descriptive variable names (...and Hungarian notation, which some people hate) when i moved from Basic / QuickBasic to Pascal and C/C++. Using short names was something i grow accostumed to with my C64 and it became a hard habit to kill until it became absolutely neccesary.
And yes, Borland Turbo Pascal was an excellent package. I don't recall a whol
Re:Ahh Pascal (Score:2)
The original Turbo Pascal fit comfortably on a single 360K floppy, with space left over for DOS and all the source code you were likely to write. The IDE included everything you'd want (including an editor that would occasionally scramble files beyond recognition -- but in 1983, that was par for the course on PCs anyway) and nothing you didn't. It was a triumph of interface engineering, given the resources it had to work with (even today, I'd prefer it to most things).
Kudos to the peop
Re:Ahh Pascal (Score:2)
Turbo Pascal (Score:2)
Re:Ahh Pascal (Score:2)
Re:Ahh Pascal (Score:2)
Re:Ahh Pascal (Score:3, Insightful)
Re:Ahh Pascal (Score:2)
The reason is, in some cases where somebody else was dumb enough to put in a 'j' or 'k' variable, the iterator will stand out which helps with overall readability. Now that I'm using python heavily, I tend to stick to the II, JJ... style for numeric loops. But for walking through collections or dictionaries I've sta
Re:Ahh Pascal (Score:2)
missed opportunity (Score:4, Interesting)
However, I wish the FP (and I don't mean first post) people and the GCC people would settle their pissing match. GCC is supposed to be "GNU Compiler Collection". When FP asked for information to help integrate FP as a GCC backend, they were told to fuck off. Talk about dickheads :(
Re:missed opportunity (Score:3, Interesting)
Re:missed opportunity (Score:3, Interesting)
freepascal does like to do things its own way and i don't really blame them. much less stressfull to stay away from politics and just write a compiler with a smallish but friendly team.
The only real problem this brings is support for less CPU types than GCC has.
btw freepascal is written in pascal (and only compiles using freepascal nowadays).
Re:missed opportunity (Score:2)
Re:missed opportunity (Score:3, Interesting)
Funny thing. But, FPC people are known for their pissing matches. Go and start reading their mailing list. It's one big pissing contest (in fact pascal people always held pissing contests with C, but I don't remember a lot of C people being bothered). Whenever someone tries to get something new... well, here we go...
Re:missed opportunity (Score:3, Insightful)
People that get caught up in pissing contests typically don't reach 2.0
The good old days... (Score:2)
That said, does Pascal really have a place these days? C is really the dominant language, and I can't help but think that this is more of a vanity project f
Re:The good old days... (Score:2)
Re:The good old days... (Score:2)
Re:The good old days... (Score:2)
Pascal and Delphi (Score:2, Interesting)
I went on to other development tools but always liked Pascal and its descendents Modula and Oberon. I never understood why Oberon never took off either.
Pascal (Score:5, Interesting)
Its good to have freepascal now supporting so many system as most of my personal system are now powerpc based
Pascal often takes alot of slack for being a toy language or a mear teaching language but it is certainly more than that and can be used to achive great results.
Personly most of my compiled programing is done in C though i would definantly prefer pascal from a debuging stand point , the support just hasn't been there for the systems i use untill now.
Great news though and i wish the freepascal team all the best
SmartEiffel, Oberon (Score:5, Interesting)
Re:SmartEiffel, Oberon (Score:2)
They've just recently decided that they are deisigning for a language that doesn't match any of the other specifications of Eiffel (close...but not compatible). I don't know what is going to happen, but this is a good time to experiment, but not a good time to commit.
Any good Pascal books... (Score:2)
Boggled (Score:3, Interesting)
Course, back then, Fortran was barely even Threetran, and we had to walk fifteen miles to school in the snow, uphill both ways.
A bit late... (Score:2)
Re:A bit late... (Score:2)
i can't compare to modula 3 as i've never used it.
Re:A bit late... (Score:2)
generally we use the term pascal in passing conversation and object pascal (which is what borland used for the language itself with earlier versions of delphi) when we wan't to be a bit more precise
the name delphi kind of implies the delphi RAD environment as well as the language imo.
The real question is... (Score:2)
Re:The real question is... (Score:2)
Not that the C syntax is only a good thing....
Real Programmers (Score:2, Funny)
Easy to shoot your own foot w/Pascal (Score:2, Insightful)
Re:Easy to shoot your own foot w/Pascal (Score:2)
btw you should have used const not var if you didn't intend to modify the parameter inside the procedure.
Re:Easy to shoot your own foot w/Pascal (Score:3, Insightful)
In C (and even more so in Java) you shoot yourself in the foot in the foot by accident, you get the wrong results from what a naive inter
Why bother? (Score:5, Interesting)
It is getting a little long in the tooth now, but this can be a real advantage. There's literally thousands of free, shareware and commercial add-on components for it, with several sites indexing them, numerous 'fan' sites on many obscure and not-so-obscure aspects of the system. Borland latest version - Delphi 2005 - can also target
All-in-all of which make continuing to develop in Delphi a very viable option. However all the advantages of Delphi do not apply to Free Pascal, which leaves it as a bit of a curiosity.
I wish the project well etc. but I really can't see, as a regular Delphi user for 10 years, why I , or anyone else, would want to use it.
Re:Why bother? (Score:3, Insightful)
Actually Borland's future is rather uncertain these days let alone their Delphi product support, so an open source cross-platform alternative for Delphi developers is most welcome addition to the FOSS landscape.
Re:Why bother? (Score:3, Informative)
freepascal supports almost all of the language features of delphi and most of the nonvisual classes
the visual bits are being cloned by a seperate project known as lazarus (its rather unpolished atm but its getting there).
Standard reading (Score:3, Interesting)
Whay Pascal is not my Favorite Programming Language [lysator.liu.se] by Brian Kernighan.
Re:Standard reading (Score:2)
Re:Standard reading (Score:3, Informative)
however the recent borland like dialects of pascal are very different. Maybe the pascal name should have been dropped at some point (borland did pretty much drop it with later delphi versions). But we don't really have any better names that people would recognise and that don't have connections we don't want (the name delphi is strongly associated with the delphi ide)
Re:Nice troll sir (Score:2)
Basic is dead in any meaningful sense, and VB.NET is about as much like it as your great-great-great-grandpa
Why Not GCC (Score:4, Interesting)
Feel free to correct me if I'm wrong here.
Re:Why Not GCC (Score:3, Informative)
- The GCC architecture with its LALR parsers is not fit for pascal LL(1) parsing model
- GCC has no support for autobuilding.
- gcc is dog slow, pascal users used to Borland compilers don't accept that. (autobuilding and separate AS are main reasons for that)
- Negotiating with commercially supported GCC teams as a small team is a hassle (can you imagine: please hold of the GCC 4 release, I want to commit some Pascal fixes)
- gcc's build process has too many dependancies, and is ve
Pardon my semi-igonrance but... (Score:2)
I'm not talking about anything really fancy, but I'm hired to do a lot of data-gathering apps - glorified highly-customized time tracker programs - and it would help a lot if I could comp
Re:Pardon my semi-igonrance but... (Score:2)
it can (in the appropriate mode) compile delphi like pascal code and it has much of the nonvisual parts of the delphi libraries availible (visual parts are being handled by the seperate lazarus project)
there have been some experments with using freepascal with the zarus although arm functionality is kinda expermental right now (its not good enough to cycle the compiler on arm right now but you can cross compile a compiler for arm and
1st Language (Score:2, Funny)
:= beats = (Score:3)
sure beats C's = any day of the week!
Re:You think they'll teach this as a starter OO cl (Score:2)
Re:Here comes FSF knocking (Score:2)
as for the operating systems well it comes down to what people want to code for. It should be noted that the main article only mentioned new architectures and operating systems. linux freebsd and win32 support are still just fine
Re:nightmares (Score:4, Informative)
modern object pascal (as in delphi and freepascal) is actually a very nice language that imo gets the balance between power and complexity just right. (unlike C++ which is extremely complecated and bytecode languages that imo feel crippled)
Re:nightmares (Score:2)
Re:Can we make an ARM cross compiler out of FPK? (Score:2)
Re:Not worth the effort (Score:3, Interesting)
(which is in fact true to some extend)
This sounds like a why bother with gcc, just use VS argument.
Moreover look at the state of Linux, where is the Open Source RAD ? IMHO Lazarus is still the closest contestant.