Free Pascal 2.0 Released
Eugenia writes "After five years of development, Free Pascal 2.0 is ready and it includes support for many architectures and OSes. It now has threading support, interfaces, widestring and better Delphi support among many other new features. OSNews posted an article introducing the updated GPL compiler." petermgreen adds a list of some of the major changes since the last stable release: "Much better support for Delphi language features (especailly method pointers); more supported CPUs (AMD64, SPARC, PPC (32 bit), ARM) and platforms (Mac OS classic, Mac OS X, MorphOS, Novell Netware); a new and better structured Unix RTL Threading support; and a large number of internal changes including rewriting large parts of the compiler to make it more maintainable and easier to port to new architectures," and notes that "Visual parts of Delphi are being handled by a seperate project known as lazarus, which has not yet reached 1.0 but should do so fairly soon."
the more development tools, the better
time is a perception of a being's consciousness
time is your 6th sense, the wierd ones are 7+
and not meant in a trollish way, but what is Pascal used for these days? What are it's inherent advantages over other languages?
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
If you didn't see the first version, will you be able to follow the plot?
I still have fond memories of screwing around with Turbo Pascal on those (even at the time) ancient IBM floppy-PC things we were stuck with in high school. At the time Java was still called Oak, and many PC's would not be happy with even a C compiler for speed. Pascal was a major step up in power and performance from the BASIC we had done, and even though I've forgotten most of it, I did learn one lesson I still use today: useDescriptiveVariableNamesPlease (Ok, a little extreme, but I can't remember the last time I used 'x' as a variable name... joy)
AntiFA: An abbreviation for Anti First Amendment.
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 :(
Is Pascal used mainly with Delphi these days? I wrote software in Pascal years ago, when you could get Borland's Pascal.
I went on to other development tools but always liked Pascal and its descendents Modula and Oberon. I never understood why Oberon never took off either.
I always enjoyed debuggin pascal(enjoyment compared to debugging other code) because it naturaly promotes clean codding which is why to this day in germany it is used as a teaching language. .
Its good to have freepascal now supporting so many system as most of my personal system are now powerpc based
Pascal often takes alot of slack for being a toy language or a mear teaching language but it is certainly more than that and can be used to achive great results.
Personly most of my compiled programing is done in C though i would definantly prefer pascal from a debuging stand point , the support just hasn't been there for the systems i use untill now.
Great news though and i wish the freepascal team all the best
The only things certain in war are Propaganda and Death. You can never be sure which is which though
If you want a Pascal-derived language that's a little more up-to-date, consider SmartEiffel or Oberon (search on Google). Both have garbage collection, object-oriented features, and both can generate small, stand-alone executables. The SmartEiffel compiler is particularly neat, since it does global program optimization.
I remember taking AP computer science back in 1984 and studying Pascal. Anyone else remember Oh! Pascal? I can't remember a thing about the language now, but I remember having a lot of fun playing with it on one of those old Commodore CBM machines. And since the computer I had at home was a TRS-80 CoCo 2 which didn't talk Pascal at all, I contented myself with trying to structure my BASIC programs (back then, BASIC had line numbers) like Pascal programs. Hard to do in a language that doesn't have a concept of modular programming.
Course, back then, Fortran was barely even Threetran, and we had to walk fifteen miles to school in the snow, uphill both ways.
-- The reason it's called the right wing? Irony.
Name one thing you can do in C++ that you can't do in Object Pascal.
Royally hose the system?
"I don't know, therefore Aliens" Wafflebox1
its so sad the impressions people like you get of pascal from shitty expericances in the education system.
modern object pascal (as in delphi and freepascal) is actually a very nice language that imo gets the balance between power and complexity just right. (unlike C++ which is extremely complecated and bytecode languages that imo feel crippled)
note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
Don't Use Pascel
I remember in the early 90's making a code review on someone's pascal code. His program was underperforming running very slow. I found out he was passing a typedef'ed char array of 255 characters as value to some function. Pushing the entire array into the stack on every function call was killing performance. After changing that to pass the array as a reference the app performed drastically better. And that was just by adding 'var' in front of the parameter argument.
Must admit I cannot see the point of this. As many point out, Pascal doesn't really exist any more as a real-world programming language outside Borland's Delphi. Delphi may be a minority taste these days, but it's still, for my money, the best (fastest development time, minimum debugging time) environment available. The Pascal language as extended in Delphi is as powerful (well 99%) as C++ and easier to handle - but it bears little resemblence to the original Pascal beyond core language syntax and structure.
.net - so there's life in the product line yet.
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.
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
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
Whay Pascal is not my Favorite Programming Language by Brian Kernighan.
Does anyone know why this is not just part of GCC? It seems that with the current methodology of compiling from a language to the GCC middle language that essentially any supported compiled languages would gain from being part of GCC.
Feel free to correct me if I'm wrong here.
Sometime before the ark sailed, Pascal was the first programming language I learned (well, except for Ti58) at college, which was on a DEC 10. An elegant, structured language as I recall, but my elegant and structured code never ran. Why? I discovered a neat way to make the code more efficient, but after many long, long sessions in the terminal room, I was told a bug in the compiler would not compile anything with that routine. So after three years of college and an IT degree, not one piece of code I wrote ever ran. I abandon my dreams of becomming an uber-programmer and became instead a network engineer, of course.
I did a whole lot of programming in pascal as a hobby many years ago, after moving from it in Basic. Since that time, I've learned C, although I haven't done anywhere near as much programming in it, partly because I lost interest in programming in general - I've found a few other IT related things that have interested me more eg., networking.
I like C a lot, as it allows you to break a lot of "general" programming the rules. However, I think it is a terrible language to learn programming in, because it doesn't enforce general programming rules that should normally be followed, unlike pascal.
After you've learnt the rules of programming in a language such as Pascal, you can usually break the rules in C relatively safely, because you realise when you're stepping across the line, can work out what the consequences will be, and how to do it safely.
Of course, you're still being a bit naughtly, and, the D you deserve will need to be sort from some other source than the programming language you're using :-)
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
I'll try and answer some of your questions, or at least shed some light on them. A lot of this really comes down to "historical reasons" -- it was created that way 30+ years ago, and so we're still stuck with it today. Kinda like the "creat()" function in C/Unix. :-)
:)
.c file for a .h file). It provided a form of encapsulation. If you were distributing a unit, you could distribute just the "interface" part and others could still use the unit.
"...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.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
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 (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.
Playing pornographics games during the day is evil! Play at night!
To answer your question: Pascal is still used for teaching in some cultures. Delphi (and the Object Pascal language it provides) still have a following in some corporate circles, especially for database front-end work. And there's a fair bit of legacy code out there.
Trivia: The original Macintosh System Software (later renamed MacOS, later renamed MacOS Classic) was written mainly in Pascal, with assembler where needed for speed or low-level implementation.
I doubt much new, interesting work is done in Pascal, though.
Pascal had some real advantages over it's contemporaries -- K&R C, BASIC, and other things now even more forgotten then Pascal. It was easy to parse, which made a Pascal compiler fast to run and easy to write/maintain. The syntax used more English words and less punctuation, which is arguably easier on the newbie.
Pascal has lots of redundancies and checks, both in the syntax and in the runtime, which made it a lot easier to write and maintain a good, robust program. Some call this "B&D programming"; others, myself included, call it common sense. I don't expect to crash my car, but I still wear a seatbelt. I use my turn signal even when I don't think there is a car in the next lane. I'm human. I make mistakes. I try to make sure the damage from my mistakes is limited.
Pascal also encouraged good programming practices in an era where there was still debate over whether good programming practices really mattered. It popularized the idea of teaching structured programming from the start (as opposed to in a footnote on page 378 of the textbook).
While the original Pascal specification made it of limited use for "real world" stuff, adaptations (like Borland's venerable Turbo Pascal) gave you all the power of C or even assembly when you needed it.
These days, most of the lessons that Pascal taught have been learned, and learned well in some new languages. Many of the things learned in the creation and growth of Pascal have also been learned, leading to languages which are all-around better. New ideas (like OO) have taken hold. Better hardware makes things like garbage collection and runtime evaluation a lot more practical.
So the need for Pascal itself, in the present day, is pretty minimal. However, it played a critical role in the evolution of computer programming as a science and as a professional discipline. It was the "first real language" many people learned. And much like a classic car that's been eclipsed by more modern technology, Turbo Pascal still has a certain elegance and appeal to those who knew it. Nostalgia, yes, but good stuff, still.
END. (* PROGRAM *)
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
Most of the issues raised in that article do not exist in Object Pascal/Delphi.
The Pascal assignment operator :=
sure beats C's = any day of the week!
Or maybe they didn't use Windows.
(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.
Rather: porting the great Delphi environment to other languages. You know, copying the best of Windows to Linux? That kinda thing.
For every expert, there is an equal and opposite expert. - Arthur C. Clarke
And the obligatory response Software Fault Prevention by Language Choice: Why C is Not my Favorite Language (PDF).
-30-