Free Pascal 2.2 Has Been Released 284
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."
Pascal is so '80s (Score:2, Informative)
For some definition of the word 'free' (Score:5, Informative)
C# programs even work in Linux, without a recompile, using Mono
Re:Mixed Reaction.... (Score:5, Informative)
Not the first free compiler to support win64 (Score:3, Informative)
um? size? (Score:1, Informative)
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."
Re:80's college nostalgia (Score:2, Informative)
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.
Re:um? size? (Score:4, Informative)
Yes, simply looking at obj size will make this look bad. Actually looking at the object itself makes it pretty clear what's really happening. Remember, 'file' is your friend.
Re:Mixed Reaction.... (Score:1, Informative)
Little to none. [codegear.com] Delphi is still actively supported despite its continued lack of popularity.
- T
Pascal is alive and well in installers (Score:4, Informative)
Re:um? size? (Score:5, Informative)
That's bad pascal. You lack the program declaration with specification of IO, and you also have a null statement at the end (the semicolon that should not be there). Try:
You might want a stronger typed language than C, where there's no risk of signed/unsigned typecasting behind your back, or where you can limit the data type. There's no risk of your plane thinking it's flying upside down when you cross the dateline, for example. Or of spinning clockwise 182 times to make a 65535 degree turn, when you really wanted a 1 degree left turn.
Then there's legibility. Pascal
I personally miss UCSD-pascal and p-code. It did what java was meant to do -- run as a pseudo-machine with pre-compiled bytecode in a machine independent fashion. Too many youngsters today think that Sun created that concept with java, when in reality it was a ripoff of USCD-pascal's p-code for a C++-like language.
Regards,
--
*Art
Re:80's college nostalgia (Score:5, Informative)
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.
Re:What's pascal like now? (Score:3, Informative)
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
Dennis Ritchie on Pascal (Score:3, Informative)
I sincerely hope the language has been fixed since that was written...
Explanation of VistA (Score:3, Informative)
For those who can't tell VistA from Windows Vista, VistA [wikipedia.org] (notice final capital letter) is the electronic health record system used by veterans' hospitals under the United States Department of Veterans Affairs [wikipedia.org]. VistA CPRS [va.gov] is its GUI front end.
Not QUITE what you are looking for, but good... (Score:1, Informative)
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
A Valuable Resource (Score:5, Informative)
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.
Re:Pascal is so '80s (Score:3, Informative)
Re:Pascal is so '80s (Score:1, Informative)
It is somewhat laughable to see the people in this discussion rave on about the language of the day (C++/C#/Python/perl/Ruby/Brainf*ck). The real pascal killer was neither. It was Mathlab and Mathematica