GNU Pascal Compiler Released For Mac OS X 77
MacDaffy writes "Kudos to Adriaan Van Os: He has produced a 'second prerelease' of the GNU Pascal compiler for Mac OS X. Work actively proceeds on porting the Carbon Pascal Interfaces for use with it (longtime Macintosh Pascal guru Peter N Lewis has already gotten a great start on this). Thanks to Adriaan, Peter, and Bill Catambay of Pascal Central for helping take Pascal on Macintosh into the future."
.pas pascal program (Score:3, Funny)
{ firstpost.pas }
var
s : String;
begin
Write('First post');
ReadLn(s);
WriteLn('You typed: ',s);
WriteLn('Hit <Enter> to exit');
ReadLn;
end.
Waiting for carbon bindings (Score:3, Informative)
I guess I'm not the only one, and there probably is a fair amount of old pascal code that is waiting to be ported to OS X. If the carbon bindings are ported, recompiling should be reasonably easy.
Re:What the??? (Score:1)
Pascal (Score:4, Interesting)
I think pascal is a great language for teaching people how to program, and I also think it is perfect for Borland's Delphi product (a nice, easy to learn RAD environment to compete with Microsoft's Very Basic). However, I personally would never use Pascal on a project. If I wanted to use something like Delphi, I would use C++Builder. Of course, since this is a Mac discussion, most of this is irrelevant.
Anyway, I am not familiar with Objective C, but if I were going to program for a Mac, and OC and Pascal were the only two choices, in spite of already knowing Pascal, I think I would rather learn Objective C.
Re:Pascal (Score:3, Interesting)
Of course rumor is that Borland may drop JBuilder on OSX because of poor sales. So that may not bode well for Borland developing for Apple period. They do seem to be (wisely) trying to stay focused on large markets.
Re:Pascal (Score:2)
Afterall, Qt supports OS X- what else would a port of Kylix to OS X require? It'd be especially cool to have a native-looking Kylux using the OS X Qt (rather than the X11/Qt that also runs on OS X).
Drop JBuilder for OS X? I thought JBuilder was pure-Java- I remember running it on OS X before it supported OS X and had an OS X
Re:Pascal (Score:2)
I can't say if that would really affect things. But then I'm not a big Java programmer. I did play around with JBuilder (the full version) and I liked what I saw. I think our Java programmers here decided to standardize on
Re:Pascal (Score:2)
Why??? (Score:4, Funny)
I can remember picking up maintenance on certain Mac apps and being horrified to find them written in a mixture of Pascal, C and 68K Assembler. All compiling under MPW and linking to a fat binary (yeah, with the 68K code).
Anyways - when I read the link, my initial reaction was 'Yeek! Pascal on the Mac again!'
Re:Why??? (Score:2)
Re:Why??? (Score:3, Insightful)
Re:Why??? (Score:4, Insightful)
Re:Why??? (Score:2)
Seriously though, isn't this just an update of their Pascal compiler? I believe that most of the GNU compilers have had PPC ports for some time. Anyone know which ones don't have PPC code?
Re:Why??? (Score:4, Insightful)
MPW I never was able to get into. It had an odd mixture of editor/cli which I never liked. Further it lacked a lot of the nice debugging features that Lightspeed Pascal had. This was *way* back in the 68K days, mind you. Programming was a damn site easier then. Further the initial versions of C for the Mac required lots of resources and never were as nice as Pascal initially. Further even on the PC side Turbo Pascal (which became Delphi) was king.
Where Apple went wrong was never following Borland's lead and pushing their development system more towards RAD. That was true with C/C++. Indeed I think one of the reasons that Apple had troubles in the mid-90's was that it was so much easier to develop software on the PC than the Mac. As computers became more complex they retained the basic approach of the 80's. That's fine and even desirable for some applications. And they did have a framework for MPW and then there was PowerPlant for CodeWarrior. But neither really addressed people who weren't trying to write an application they wanted fine control over. There never was a Delphi for the Mac.
Now we have Interface Builder and Obj-C. However I still think, as nice as those are, that Microsoft with C# and Borland with Delphi/C++ Builder have better RAD tools.
Re:Why??? (Score:2)
Length-prefixed strings (Score:2)
Re:Why??? (Score:2, Interesting)
Re:Lickable Pascal (Score:1)
Archeo-computaion (Score:4, Funny)
What is really wrong with it? (Score:2, Insightful)
Re:What is really wrong with it? (Score:5, Informative)
Some of it is simply fashion: as C grew in popularity, it simply overtook Pascal in the new APIs that were developed. Once Pascal interfaces to the Mac OS became second-class citizens, there was no reason to favor it.
Another part of it is that Pascal was originally a teaching language, meant to indoctrinate structured programming. It deliberately tries to hide machine or OS-level reality with an idealized abstraction. It was not meant as a flexible all-purpose language like C. You couldn't write an OS kernel in Pascal very easily. One specific area in which it lacks flexibility is type conversion. For pointer or scalar (enum & integer) types, it really wants you to pick one type and stick with it. Good for enforcing discipline on software engineering students learning to design structured data types, poor for hackers who need to deal with the not-so-disciplined reality.
Another area where it lacks is file I/O. The standard doesn't really define byte-level results of its file operations, so reading/writing files compatible with other languages/API's depends on vendor extensions, which aren't uniform.
Similarly for structure layout. Although it isn't 100% defined, you can usually convince any C compiler on a given platform to agree with any particular arrangment of bytes in a structure. It's much harder with Pascal. This means that no matter what your OS, C code can be written mostly independent of compiler vendor, or at least with the nastiness hidden in header files.
Pascal also has a pretty inflexible (perhaps a bit clumsy) structure for writing your own libraries (units). In C implementations, you write a bunch of routines, a header file for users to #include, and make a
There are also a couple of omissions. I believe many implementations did not allow functions to return structure types. That's what drove me to C from Pascal many years ago. I believe arbitrary length arrays are also a bit clumsy to work with (not like C where you can have null-terminated arrays and use pointer arithmetic to navigate). Polymorphic types & pointers are clumsier in Pascal (no void* to ignore the differences when you want to.)
In general, Pascal works fine if you are writing a single application that requires only interfaces & libraries that your compiler vendor knew about. TeX by Knuth is an example. His programs (at least of that era) are monoliths, not collections of libraries and interfaces. You need to tweak a few routines to work with a particular vendor/platform, and that's only because Knuth very consciously made it that way.
Once you start working with libraries from multiple sources, the Pascal model begins to strain.
The Pascal folks would say that "Extended Pascal" plus OS-specific extensions in most compilers allow you to overcome all of these. But the extensions only happened after C began spreading like a virus, helped by its exposing all the weaknesses in Pascals that lacked full extensions.
Re:What is really wrong with it? (Score:2, Insightful)
OO, multithreading, good support for low level access and interfacing to other languages.
It's a pretty easy step to translate Pascal code to Ada (can be done automatically).
Ada is certainly better than C for writing code; probably not as flexible as Objective-C.
Re:What is really wrong with it? (Score:1)
About Pascal (Score:2)
I admit Pascal is somewhat of a dinosaur in the syntax department, but then
Great ... (Score:2, Informative)
Seriously, I started out programming for the Classic Mac OS in Pascal ages ago, but haven't touched it recently; with all the C, Java, etc. tools now available for OS X Pascal has been, quite correctly, left by the wayside. It feels kind of archaic to me now, and I gather I'm not alone
-- shayborg
Re:Great ... (Score:1)
Re:Great ... (Score:2)
Good One (Score:2)
Now that's funny.
Pascal *sigh* the memories (Score:3, Insightful)
Anyone NOT cut their teeth on a Tandy or IBM XT/AT, Turbo Pascal?
What was so great about TurboPascal?
The IDE. Pretty much the first hobbyist compiler package with an IDE. No more "exit editor, compile, get error, edit, compile, run" etc etc
Remember using it for demos? Compiled way faster and smaller than the C compilers did at the time.
Remember Turtle Graphics?
BGI?
Turbo Vision?
Remember using it for BBS doors? FOSSIL drivers?
Back in the early/mid-80's, when TurboPascal first came out, for $49, it rocked the world and made Borland in to a HUGE success.
Re:Pascal *sigh* the memories (Score:1)
However, after a while the limitations of Pascal did become a pain, and when I got to use C on BSD Unix in college, I never wanted to go back to Pascal. I do sometimes have a little nostalgia for it, though. If I needed to dive into some Delphi or Kylix project someday, it might be fun.
Re:Pascal *sigh* the memories (Score:2)
Though with all the college level classes I had from '89 to '97, none of them had anything to do with programing in a GUI, which is why I'
Re:Pascal *sigh* the memories (Score:1)
The documentation was only in PDF format, which would have taken two reams of paper to print out
#1 Get job in office
#2 Connect to copier via TCP/IP
#3 File-Print
#4 Wait about 5 minutes
#5 Bind it and take it home.
Re:Pascal *sigh* the memories (Score:2)
Re:Pascal *sigh* the memories (Score:2)
PC's? Where did you get the money? (Score:2)
Today you'd call that a cool hack - back then it was how things were done.
Pascal is good, Kylix would be great! (Score:1)
I'm happy that for us pascal junkies, that pascal is finally becoming available for OS X. What would really be impressive, however, would be if Borland got it's act together and released the Delphi Kylix [borland.com] toolkit
Kylix is already a great cross-platform tool for Windows and Linux Object Oriented Pascal development. Making it available for Macs would make it definitely more competitive with the QT [trolltech.com] toolkit which is cross platform for Windows, Linux and OS X!
So to make a long rant short, I'm not jumping
Re:Pascal is good, Kylix would be great! (Score:2)
Re:Pascal is good, Kylix would be great! (Score:2)
Make the OTHER switch (Score:1)
Why did I switch AWAY from Apple? Pascal, Inside Macintosh, and the exorbinant prices you had to pay to get it. As a grade school student growing up in rural Vermont, we did have computers (donated by IBM Essex Jnct) but there was zero computer related curriculum.
Re:Make the OTHER switch (Score:1)
Of course, this is all just my opinion. I respect your opinion, and would go so far as to agree that when I'm not working in an OO language, I prefer to work in either Perl or C.
I guess I just felt obligated to support the OO languages.
-Jeff
Re:Make the OTHER switch (Score:2)
(IMHO, OO in perl is really quite cool.)
Re:Make the OTHER switch (Score:1)
-Jeff
Myst was made with Hypercard (Score:2)
Not that it didn't also require a lot of graphic work, but it is just one example of "silly basic stuff" that, as the saying could go, is more impressive than what it was made with.
For the record, Apple had a visually oriented Basic that Microsoft forced them to kill, as it would compete with their Basic (which wasn't visually oriented.) Hypercard was created to replace it, and from what I understand there are still many users
Re:Myst was made with Hypercard (Score:2)
Re:Myst was made with Hypercard (Score:2)
Sure HyperCard was pretty cool. I'm not dissing HyperCard. I'm dissing Apple's policies of charging big money for API docs, thus inhibiting my HyperCard development activities. I have done some pretty impressive stuff with HC, but only because I was able to skank an old copy of the developers manual from someone who got a newer edition. And AppleScript (which is also pretty cool and I also used quite a bit in the past) is of cou
Re:Make the OTHER switch (Score:5, Insightful)
C has its place, to be sure. So does Pascal. Neither have much of a place in my toolbox for what I do.
Apple may have lost you as a programmer, and you seem to think that is a huge loss on Apple's part. What killer app did you bring to another platform that they missed out on?
Pascal is junk. Free software forever.
RTFA. The port is of GNU Pascal. Which is free software. It's sad to see so many oSs h4k3rz associate C so closeley with Free software that there is no room for any other languages.
What does C do that Pascal doesn't?
Re:Make the OTHER switch (Score:1)
What are your thoughts on Eiffel?
Re:Make the OTHER switch (Score:2)
Are you an Eiffel user?
Re:Make the OTHER switch (Score:1)
It also does a great job of handling multiple inheritance and operator overloading, with keywords to explicitly distinguish infix, prefix, and postfix operators. Constrained genercicity can be a nice tool too.
Re:Make the OTHER switch (Score:2)
Write me an OS kernel in Pascal, and then we'll talk.
Re:Make the OTHER switch (Score:1)
I couldn't afford to buy a complete set of Inside Macintosh.
FWIW, it's all online [apple.com] now.
Re:Make the OTHER switch (Score:2)
this is so exciting (Score:2, Funny)
Good reason for Pascal compiler on Mac (Score:1)
http://www.sulaco.co.za/opengl.htm [sulaco.co.za]
And they could make really great screensavers...
Re:Uhm... so they spent money making something... (Score:2)
I'll stick with Carbon apps until Apple fixes the text views and file i/o