Free Pascal 2.2 Has Been Released
Daniel Mantione writes "Free Pascal 2.2 has been released. Several new platforms are supported, like the Mac OS X on Intel platform, the Game Boy Advance, Windows CE and 64-Windows. Free Pascal is now the first and only free software compiler that targets 64-bit Windows. These advancements were made possible by Free Pascal's internal assembler and linker allowing support for platforms not supported by the GNU binutils. The advancement in internal assembling and linking also allow faster compilation times and smaller executables, increasing the programmer comfort. Other new features are stabs debug support, many new code optimizations, resourcestring smart-linking and more."
I learned Pascal in the 1980's when I was in college. Haven't used it since. I never did like the strict type checking or the whacky for loops that had to run at least once. FORTRAN and then C/C++ have served me pretty well over the years, although I write a lot of PHP, bash, and some C# now.
If you don't want crime to pay, let the government run it.
Microsoft's free C++ compiler has been able to target x64 for quite some time ... it isn't open source, but is free as in beer.
:)
C# programs even work in Linux, without a recompile, using Mono
You're mixed up on what alliteration is.
Nerd rage is the funniest rage.
Just the first free compiler that has an official release. The trunk of GCC supports Win64 for a while now. Just there has not been a release yet. This has been true since 2007-03-30. Binutils support win64 was added 2006-09-20.
I just installed 2.2.0 on my x86_64 box and this is what I got for hello world ...
... why would I want Pascal?
tom@core2 ~ $ ls -lrt test?
-rwxr-xr-x 1 tom users 145208 Sep 10 19:03 testp
-rwxr-xr-x 1 tom users 6384 Sep 10 19:05 testc
Both were run through "strip" to remove any possible debug/extra details. testp is from this pascal program
begin
writeln('hello world');
end.
And testc from
#include <stdio.h>
int main(void)
{
puts("Hello World");
return 0;
}
Aside from the ubiquity of C, the fact that there are few moving targets [e.g. aim for C90 and you're usually fine], and that it seems to produce smaller binaries
Don't get me wrong, I was a pascal whore when I was kid too. But let's face it. Everything [that matters] is written in C, C compilers are everywhere, and their optimizers are highly kick ass. I just don't see why FPC matters beyond being a nice hobby project to rekindle "the old days."
Someday, I'll have a real sig.
http://taoyue.com/tutorials/pascal/contents.html
I've been reading through that and it seems pretty decent.
Googling "pascal tutorials" or something similar turns up quite a few results as well.
I wonder how much orphaned legacy Delphi code there is out there looking for a support route.
Little to none. Delphi is still actively supported despite its continued lack of popularity.
- T
InstallShield and InnoSetup installers contain PascalScript engines. InnoSetup is written using Delphi -- Pascal. I believe InstallShield is too, but it's been a while since I quit using InstallShield in favor of InnoSetup.
Pascal is arguably one of the easiest languages to learn there ever was. It's very verboseness leads to readable code, but don't confuse that with weakness. Modern Pascal implementations like Delphi and Free Pascal are powerful languages.
The basics of pascal are simple:
Note the difference in the way the function and the procedure are declared above. Pascal passes parameters either by reference or by value. Using the var directive in the procedure declaration of x as integer I told the compiler to pass the value in by reference and therefor that value can be changed by the procedure. Note that when declaring the parameter this way I can ONLY pass a variable to it of the same type, or typecast a variable of a similar type. If I do NOT use the var invocation in declaring the parameter I can pass either a variable or a literal as below:
This should give you a basic start, the rest is really easy. Pascal does pointers, Structures, file I/O with either typed or untyped files, Inline Coding, Inline Assembler, pretty much everything you would expect from a robust language.
Hey KID! Yeah you, get the fuck off my lawn!
> 1. The standardized language was very small, so there was a tendency for it to fracture into many incompatible languages.
.NET is just that.
.NET is just as well integrated as C# and VB.NET are.
.NET. Lazarus has still ways to go but is usable now.
Small is relative. Pascal language is now Object Pascal. It is not a small language.
> 2. At that time, the implementations represented a string as a length byte followed by the string data, so you were limited to strings of length 255.
Delphi and FreePascal have PChar as well as AnsiString.
> 3. I don't think there was any (standard) way to defeat the strong typing in cases where you needed to.
Delphi and I believe FreePascal support the Variant data type (ala VB). So you do get weak typing when you need it. This is used for runtime COM and for cleanly interfacing with dynamic languages. Python for Delphi uses this with much success.
> 4. Was there garbage collection? If so, I don't recall it as being an idiomatic part of the language, except maybe for strings...? Well, most languages back then didn't have it (and gc's sucked back then, so gc languages tended to be slow), but today...
There are Pascals that target VMs (Java/.NET). In fact Delphi for
> 5. I was always annoyed by the gotchas in the syntax -- the language seemed unnecessarily picky about periods and semicolons.
I would not call it a gotcha but needs a bit of getting used to for someone from a C/C++ background. That remains.
> Has any of this changed? Has modern pascal settled on a single standardized version of the language?
Borland's implementation is still considered the standard.
> Is gc easy, idiomatic, and consistently supported in libraries and language constructs?
Delphi for
> Is there good unicode support?
I recall Delphi doing that quite well. Don't have much experience on that.
> It seems to me that today, if I wanted a typesafe language I'd use java, and if I wanted a language that compiled to native code I'd use C or OCaml.
Modern Pascal compares favorably with C++.
It's not about the language per se. FreePascal and Delphi offer great tools and libraries for certain types of tasks. OCaml is great as a language but is still considered an academic language. It does not have great tools or a comprehensive community compared to Delphi. For building native high performance GUIs with good OS integration and plenty of functionality, Delphi remains to be the most productive way to go with thousands of drag and drop widgets - both free open source as well as commercial. Currently Delphi for Win32 is the only real option to build native GUIs for Windows since MS has steered its RAD tool development towards
http://www.lysator.liu.se/c/bwk-on-pascal.html
I sincerely hope the language has been fixed since that was written...
No sig today...
For those who can't tell VistA from Windows Vista, VistA (notice final capital letter) is the electronic health record system used by veterans' hospitals under the United States Department of Veterans Affairs. VistA CPRS is its GUI front end.
Visual Basic Programmer's Journal, issue 1997, oct. "Inside the VB5 Compiler engine"...
That's where Microsoft's VB5, & VC++5.x got the shit kicked out of them on 7-10 tests by Borland Delphi 2.0!
(& most importantly, on math & strings processing, which every program does. Delphi won by HUGE margins on those (like 2.6x as fast iirc) & only lost to VC++ on form paints (by NOT that big of margins as it won by & text form loads))
The rest went almost across the boards to Delphi 2.0 vs. those 2 MS products.
Well - VB won 1 area over BOTH MSVC++ 5.x & even Delphi 2.0 was ActiveX form loads (which it is/was (since the VB5/6 line just died a year or so back) HEAVILY oriented to)...
There you go: One documented proof in publication in a competing trade journal's pages no less, where Delphi (object pascal 7 engines based) did in BOTH VB & VC++...
APK
P.S.=> & on std. single executable design Win32 PE format executables - fastest thing under the sun, especially when compiled with a good optimizing compiler (which Delphi has, best there is no less proven above as so vs. its major competitors) & inlined assembly + hand optimization techniques, & good error trapping on a coder's part... apk
Bill Catambay has done yeoman work in keeping the Pascal spark alive in all its flavors. For those of you who are nostalgic, curious, desperate, eager to find a centralized repository for mockery, or want to try one of the easiest, most powerful tools you've ever used, visit Pascal Central. Tools, compilers, source code, links, Bill's article on the reasons Pascal is still relevant (which I helped edit), and a community of people ready, willing, and able to get those of you interested in giving the language another look (or a first look) a lot of help and support.
If you want power, readability, a maintainable code base, easier string-handling, no-brainer memory management, and an elegant "No-BS" language, try Pascal. It has survived this long for a reason.