30th Anniversary of Pascal 587
GrokSoup writes "UC San Diego is holding a public symposium on Friday, October 22nd, honoring the 30th anniversary of the Pascal programming language. Oh the memories of undergraduate bubble-sorts ..."
The 11 is for people with the pride of a 10 and the pocketbook of an 8. -- R.B. Greenberg [referring to PDPs?]
More serious apps... (Score:5, Informative)
Pascal was more than just undergrad bubble sorts. The original Mac had all the hooks and development stuff in Pascal. If memory serves the Mac was the largest Pascal project going. Using C (Lightspeed C, circa 1986 or so) was a real bitch on the machine.
Re:More serious apps... (Score:5, Informative)
Re:More serious apps... (Score:3, Interesting)
Re:More serious apps... (Score:5, Informative)
Re:More serious apps... (Score:4, Insightful)
You've got issues.
Are you suggesting that because Java implemented Vector in it's API library (which, by the way is now ArrayList in Java as well) that it somehow has a right to be the only language that implements Vector, and therefore call all other languages that implement vector a rip off?
Vector is a Collection, it's a concept that all people learn when studying computer science, so it makes sense to have that kind of 'dynamic array' in your API no matter what languahe it's in (python, java or c#).
What you're trying to say, that the subtle differences between languages are not enough to differentiate them. Yet in today's world of hi-level languages and managed runtimes, the only thing to differentiate between languages are the subtle differeces.
Look I don't really care which language is better (in your mind or anyone elses), the fact remains that untill C# came along with the newer language constructs and features, Java didn't even bother to implement them. So at the very least, the competition is spurring on development/innovation between the two companies.
Oh and by the way, doesn't your language also lend itself to the 'java is a rip off of C++' arguement, since they are so similar and c++ came first ?
It's apples and oranges dude, and your agument is a total troll.
Re:More serious apps... (Score:3, Insightful)
Re:More serious apps... (Score:3, Informative)
The difference is that the one has constanct time appends and inserts (the linked list) while the other one has constant time indexed lookup (the Arraylist). Both are needed because the access patterns of the collection cannot be predetermined by the API.
The naming convention used is quite logical if you bother to look fur
Re:More serious apps... (Score:3, Interesting)
OMG! you too! (Score:5, Interesting)
But didnt Pascal lead people to think of P-code which foreshadowed Java bytecode? a link off the article's link [threedee.com] seems to agree with my memory...so i better not read it too carefully;)
and I certainly didn't use pascal just for academics. When I execavated the basement hole for my house, on an ostensibly unbuildable scrap of bedrock-studded land, a pascal contour mapping program that I wrote detected the one spot where the bedrock would be flat and need no blasting...back hoe guy was amazed an amateur could show him right where to dig.
Re:More serious apps... (Score:5, Interesting)
Though the world would have been a better place had it been so limited. My pet peeve was the weirdly brain dead default string implementation. Strings weren't null terminated, instead the length of the string was stored. That's a good idea. A bad idea is using the first byte of the string to hold the length. 8 bits to store the string length means a maximum string length of 255 characters. I worked on a large project that had originally been written in Pascal. We used p2c to convert it and maintained it in C. An early task was removing the 255 character long string brain damage and replace it with intelligent strings (in our case C++'s generally good and absolutely superior to Pascal's std::string). Still, I got to read and occasionally maintain the Pascal master for a variety of reasons. The code dealing with strings was always irritating. Sometimes it just ignored the problem (creating potential buffer overruns), sometimes it just crudely limited the string length (meaning, for example, that you couldn't have a URL longer than 255 characters), and sometimes it used some weird chained string extension that I never quite understood. Mac programmers I know told me that the 255 limit was pervasive throughout MacOS as late as MacOS 9. Most unfortunate.
(To be fair, it did seem like a pretty good language, and I really dug the "with" idiom. A healthy revision (that may have happened, I don't stay up to date on Pascal) could have turned it into something more mainstream and successful. Hell, let's be honest, I just wanted to bitch about the stupid strings...)
Re:More serious apps... (Score:5, Informative)
That is 7 Delphi versions ago, btw, so it's not exactly new any more
The advantage of the "Short" strings is that they can be allocated on the stack and thus have no memory manager overhead, pointers etc associated with them - which makes them simple to use. And many strings *are* less than 255 chars, always.
If you need longer strings, use Delphi 2 or later. The AnsiString implementation is certainly heads and shoulders above the std::string from the STL, which I have found to be astonishingly inefficient several times.
I guess it's all a matter of taste
Re:More serious apps... (Score:5, Funny)
Re:More serious apps... (Score:4, Insightful)
Re:More serious apps... (Score:5, Informative)
Re:More serious apps... (Score:3, Interesting)
Now, I'm an interested bystander but not a programmer. Nonetheless, just from knowing the app well in everyday use, I can make sense of the Pascal source (even tho there's not a single comment anywhere) -- enough to have some idea what I'd like to tweak, and maybe even how
And it's easy to implement (Score:3, Informative)
I strongly recommend Jack Crenshaw's (free) introduction. [iecc.com]
I seem to remember that the compiler is written in Pascal. I translated it to C as a I went along. You could always use GNU Pascal [google.com] (That's a google link, because the site seems to be refusing connections. Could that be related to this FPP?)
FREE PASCAL! (Score:3, Informative)
Both apps are Free Software (GPL).
www.lazarus.org [freepascal.org]
www.freepascal.org [freepascal.org]
Lazarus := Delphi-like (almost a clon) IDE for Win32 AND Linux. It's API independent: can use transparently GTK+, Windows graphic system... etc.
FreePascal :=
Portable? no problem! It's available for different processors Intel x86, Motorola 680x0 (1.0.x only) and PowerPC (from 1.9.2).
The following operating systems are supported: Win32, Linux, FreeBSD, NetBSD, MacOSX/Darwin, MacOS classic, DOS, OS/2, BeOS, SunOS (Solaris), QNX and
Even more serious (Score:5, Insightful)
And in certain circles, Pascal is still the language of choice. Lots of people who hack out basic native-code Windows software prefer Borland's Delphi IDE [borland.com] to any alternative. One reason is the programming language [wikipedia.org], which is actually an object-oriented extension of Pascal.
I spent 3 years at Borland, documenting their component libraries [wikipedia.org], which are mostly written in Delphi. I came to appreciate its simplicity and power. My job required me to go back and forth between Delphi and C++ (the same libraries are used in Borland's C++ products) and it was an object lesson (forgive the pun) in how painfully baroque C++ has become.
It's a pity that Pascal/Delphi has so thoroughly lost the language wars. But it has. Even if C++ hadn't thoroughly taken over native-code programming, Borland's bizarre and insular corporate culture would keep from spreading beyond a few fierce loyalists.
Re:More serious apps... (Score:3, Informative)
And remember, TeX is still written in Pascal.
Re:More serious apps... (Score:3, Interesting)
Loved it!!!! (Score:5, Interesting)
Re:Loved it!!!! (Score:4, Funny)
Hi, Jeffrey (Score:4, Funny)
All your productivity are now belong to CmdrTaco [slashdot.org]. Hope you like it here!
Cheers,
Gaurav
Re:Loved it!!!! (Score:5, Funny)
Re:Loved it!!!! (Score:4, Funny)
Welcome (Score:5, Funny)
> so i wish to formally introduce myself to the
Welcome to Slashdot.
Just be careful with the words "first post!"
Re:Loved it!!!! (Score:5, Interesting)
For my final CS project in high school, we had to basically write an interpreter for a small set of assembly instructions. A rudimentary virtual machine, in other words. Well of course the normal approach was a simple text-prompt interface, but I used a shareware graphics library (Fastgraf?) and built a GUI right up from the bare pixel level, with multi-windowing, menu system, illustrated help, 'advanced' features like Start At and Trace, and even user selectable mouse cursors. Ah the memories..
Anyway, welcome to Slashdot! Don't feed the trolls.
Started with QBasic (Score:2)
I think when I start teaching programming classes at my old high school I'm going to start with Python so you get one language that can do both objects and procedural programming... anyone recommend otherwise? I'm just a bit curious.
Re:Started with QBasic (Score:5, Informative)
Um, how about Pascal? (Score:3, Interesting)
What do they teach in undergrad now? (Score:5, Insightful)
Re: What do they teach in undergrad now? (Score:4, Insightful)
> But that was a long time ago and I pose the question. What language is the "teaching language" now? Do they have Pascal?
Pascal, C, C++, Java,
Re:What do they teach in undergrad now? (Score:5, Insightful)
It's like teaching people to drive with semi-tractor trailers.
Re:What do they teach in undergrad now? (Score:3, Interesting)
Re:What do they teach in undergrad now? (Score:4, Interesting)
> languages like Java or (before that) C++ rather than a language specifically
> designed to be clear to new programmers.
Pascal was created to teach "correct" structured programming.
When the prevalent paradigm shifted to OOP, it became outdated.
Re:What do they teach in undergrad now? (Score:3, Interesting)
The hardest part was trying to figure out when to use '.' versus '->', and the always-fun '*' versus '&'. I knew what I was trying to say, but trying to figure out how to express it in valid C++ syntax was an absol
No change in France ? (Score:2)
In France at the PrePa to get into one of the Grand Ecoles it's still Pascal. Incl the Namesake [wikipedia.org].
Re:What do they teach in undergrad now? (Score:3, Informative)
Re:What do they teach in undergrad now? (Score:5, Interesting)
Pity they're going with Java for beginners nowadays...
Re:What do they teach in undergrad now? (Score:3, Insightful)
After all, the important thing to a freshman class is to understand what's happening in a loop, or a sort block or whatever. That fundamental stuff never changes so why change the language you teach it with???
LISP at MIT (Score:3, Informative)
Re:What do they teach in undergrad now? (Score:3, Informative)
Re:What do they teach in undergrad now? (Score:5, Insightful)
If a language can do that to you, it is a language worth knowing. Most modern languages (read scripting, like Perl, Python, Ruby, etc) support many functional paradigms, like map, lambda functions, etc. They are incredibly useful, if you know how.
Re:What do they teach in undergrad now? (Score:5, Insightful)
The reason they use it is because the program is based on MIT's highly-esteemed CSCI curriculum.
If Scheme fucked you up then you didn't really know anything about programming. LISP is a pretty questionable language for real world programming, but for the little tasks they make you do in Intro to CS it's perfect. It lets you learn about recursion and the fundamental sameness of code and data without a bunch of syntactical overhead.
Then later when they dump you head first into C for Machine Architecture and Operating Systems you can at least write good algorithms while you grapple with pointers and memory management.
It's a hell of a lot better then teaching kids Java's class libraries or a million magic ways to do things in Perl. A CSCI degree should not teach you things you wanted to know before, it should introduce you to all the things that make a good programmer. Study hard kid.
Re:What do they teach in undergrad now? (Score:3, Insightful)
Want Scheme to be an object-oriented language? You can make it one pretty easily, but first you have to understand the concept of closures and lexical scope. Want to learn functional programming? You can make a Y-combinator in just a few lines. Want to learn backwards-chaining declarative logic? Under 10
Re:What do they teach in undergrad now? (Score:3, Funny)
Niklaus Wirth (Score:5, Funny)
"Europeans call me by name, Americans by value."
Re:Niklaus Wirth (Score:4, Interesting)
The version of this story that Niklaus Wirth told me (via e-mail) is that it happened when he was presenting a paper in New York in 1965. He was introduced by Aad van Wijngaarden as follows:
Wirth considered an excellent pun, but he doesn't take credit for it.
Let me be the first to say... (Score:5, Funny)
begin
writeln ('Happy 30th Anniversary Pascal. You roxxorzz');
end.
Re:Let me be the first to say... (Score:3, Interesting)
FROM InOut IMPORT WriteString,WriteLn;
BEGIN
WriteString("Happy Birthday, Dad!");
WriteLn;
END HappyBirthday.
Re:Let me be the first to say... (Score:4, Insightful)
program Anniversary (OUTPUT); {* define file used *}
begin
writeln ('Happy 30th Anniversary Pascal. You roxxorzz') {* semicolon not need before end *}
end.
Re:Let me be the first to say... (Score:3, Insightful)
So encourages my teacher, but why? if you want to add a line afterwards, you'll need to add in a semicolon or face unexpected error messages - why not just put it there in the first place?
Pascal was good in... (Score:3, Insightful)
Re: Pascal was good in... (Score:2)
>
It was explicitly designed as an instructional language, to help (or force) beginners to get into some good habits before being turned loose in the jungle of real-world IT.
30th anniversary... (Score:5, Funny)
Re:30th anniversary... (Score:5, Funny)
Only if the right brain didn't know what the left brain was doing at the time.
Those memories may be distorted (Score:3, Interesting)
Sometimes you need a hack, and Pascal's purpose in life it to prevent those convient little hacks.
A teaching language (Score:3, Insightful)
ouch! (Score:2, Insightful)
Re:ouch! (Score:2)
Re:ouch! (Score:5, Insightful)
I used Turbo Pascal for DOS to write real-mode device drivers that loaded before windows did that communicated and made callbacks to windows applications written in Delphi (using the DPMI 0.9 API)
There really was nothing that could not be done or hacked with Turbo Pascal (and assembly) and Delphi (and more assembly as needed).
Borland DID get windows, more than MS did.
None of MS widget wrappers around the raw windows API compare in any degree to Borlands excellent VCL (Visual Class Library) that encapsulated and extended windows in a most wonderful way.
I've seen people program in Delphi who only know how to program in C and it looked like it. Ugly, nasty code.
I've seen Delphi code written by people who understand object Pascal and it is a dream to behold. (I've done some good stuff too).
The reason Delphi didn't catch on enormously is partly to do with it not being a cross platorm language (object pascal I mean) butmostly for the same reasons smalltalk, scheme, EISA and so on didn't catch on. I wish I knew what that reason was.
Sam
Re:ouch! (Score:4, Insightful)
I think the reason Delphi hasn't become mainstream is the same reason many other excellent products haven't. Microsoft cloned it with VB and kept just close enough behind that it was acceptable to choose the un-FUD'd development environment.
Re:ouch! (Score:5, Insightful)
ah pascal (Score:3, Interesting)
Delphi (ObjectPascal) rules. (Score:5, Interesting)
WP.(Franciscan)
(P.S. I never ever shipped any app with the BDE in it. That, and the Database Desktop, are the crappiest things ever to come out of Borland. They are still in the latest native Win32 version of Delphi, Delphi 7, but at least you don't ever have to use them.)
Re:Delphi (ObjectPascal) rules. (Score:2)
I don't know a ton about Pascal, but I do know a lot of people who were taught C then picked up Java are surprised to realize portable P-code predates the idea of JVM in terms of transportable byte code...
Re:Delphi (ObjectPascal) rules. (Score:3, Interesting)
Re:Delphi (ObjectPascal) rules. (Score:5, Interesting)
FYI there are attempts to make an open source version of it using freepascal. I have never tried them but I'd be interested in the experiences of anybody who has.
Re:Delphi (ObjectPascal) rules. (Score:3, Interesting)
I also agree BDE SUCKS, I have long used Allround Automations Direct Oracle Access [allroundautomations.com] for database access. That rocks, fully integrating the OCI drivers easily into your application and it there is a Kylix and Delphi version as well as I am sure a
Hey, it legitimized the PC (Score:2, Insightful)
Seems like a limited (and rather verbose) language now, but it was UCSD Pascal for the Apple II and shortly thereafter Turbo Pascal for DOS that made it possible to create sophisticated and transportable programs on personal computers without spending a fortune on development tools. Prior to that point it was either assembly-level hacking (which produced some amazing work, but didn't generalize well) or BASIC (no more need be said...)
end;
So cool... (Score:5, Interesting)
Way, way ahead of its time. It was an IDE and the code it generated was bytecode, not native code. I love hearing all the Java weenies talk like the Java VM is somehow a "new" concept when P-code was availble for a real language in the early eighties.
I wrote a "conquer the galaxy" game in UCSD Pascal when I was 19. Such fun, dealing with overlays to fit it in the 64k of my Apple ][+. I never sold it, alas, so dreams of become a rich game programmer never panned out.
It's funny...it also had the last IDE I actually liked.
Unfortunately for UCSD, they priced it too high, and Phillipe Kahn came in and stole the PC Pascal market. Of course, the grad students who actually designed and wrote the system never saw a penny.
Re:So cool... (Score:3, Interesting)
At least one guy did. Wizardry was done in UCSD Pascal. Even in 1980, it surprised the hell out of me to see a commercial game done like that.
Re:So cool... (Score:3, Interesting)
Couldn't seem to handle getting rid of a ';' before an 'else' though (one of the more brain-dead features of the Pascal syntax IMO).
I wrote my Go playing program in UCSD Pascal (Score:3, Interesting)
The Apple II also had a fairly good interpreted Lisp (Pegasis Lisp) that I used a lot way back then. The Lisa editor/macro asembler was also great (as long as I am getting nostalgic, what about Bill Budge's great 3D library for the Apple II).
Why Pascal is not always my favourite language (Score:3, Informative)
Why didn't it succeed? (Score:2)
I'd be interested to hear why people think Pascal never caught on like C or Java did? My understanding is that nowadays one of the Borland tools implements what is essentially an OO-version of Pascal?
Re:Why didn't it succeed? (Score:3, Informative)
The problem with Pascal, was that it wasn't cross platform with other operating systems (Solaris, HP-UX, AIX, whatever...). And it didn't have access to the windowing/networking libraries that C programs had on UNIX (It wasn't until 1993 that Microsoft starting including TCP/IP with PC's
Re:Why didn't it succeed? (Score:4, Interesting)
1) It's much easier to write a C compiler than a Pascal compiler, therefore the (early) availability of the C language on new platforms became a near certainty.
2) It didn't take project and product managers long to realize that in the era of Moore's Law, platform flexibility had great value. A project stuck on an obsolete platform due to the unavailability of its language on a revolutionary new platform was doomed, perhaps prematurely.
So its portability and ubiquity were C's most significant advantages over Pascal, back when there was a realistic contest.
3) For a time, executables written in C were likely to be considerably faster than those written in Pascal. This was a byproduct of the re-use of the C compiler code itself, versus fresh (read: immature) attempts at Pascal compilers. The C compiler cores got better with each processor port, but the freshly-written Pascal compilers often were not very good.
Today on the x86 platform with Borland's highly-refined 8th-generation compiler core, executables built from well-written Pascal are as fast as those built from coherently-written C, in my experience. It may be possible to write incredibly concise C that'll be a hair faster than the same thing written in Pascal, but arguing that difference is a fool's errand in the days of 4GHz rocket-ship machines executing septillions of NOPs waiting for something to do.
Personally, I choose Delphi these days over C, because I write and support huge projects. It is incredibly easy to pick up Pascal source and quickly figure out exactly what it does. That's the first (and most crucial) step in any software maintenance, and I find that Pascal's support cost savings more than over-balance any possible advantages I've ever realized from using C. When I'm writing something that needs to be extremely fast, I drop into inline assembly, but everything else I code in Delphi these days.
Re:Why didn't it succeed? (Score:5, Informative)
But you are quite right, compilers where the reason. C.A.R.Hoare (of quicksort and CSP fame) tells a good story where early in his career he led an Algol compiler team into disaster - after two years of careful programming they produced a multi-pass compiler and when they first tested it, it managed to correctly translate 1 line of Algol per second!
Re:Why didn't it succeed? (Score:3, Insightful)
Not true. Pascal is generally easier to write a compiler for than C. Now you might be focusing on the optimization side of things, and in that case you'd be right. A naive compiler typically generates much better code for C-style pointer math than for arrays, and in Pascal you use the latter.
Re:Why didn't it succeed? (Score:3, Informative)
Ada lives on, kinda (Score:3, Informative)
Although calling Ada a success would be pushing it, it seems my companies large projects work best in ada, then c and c++ is always a disaster.
Ada lacks a lot of libraries that make java/ c so useful. But as someone pointed out (with a chuckle), you can bind Ada calls to C making it as powerful as C!
Pascal was more than a programming language (Score:2)
Memories of Pascal (Score:5, Insightful)
Now there are other languages to learn with (and a few of those aren't just for educational purposes). Java, PHP, and C for example. Even Delphi has kept Pascal alive and relevant.
Back then, I had to find...um...creative ways to be able to program and compile Pascal code. With all the freely available IDEs, compilers, debuggers, etc. around now for all these various languages (especially through OSS), things have become more accessible.
Pascal was the language that brought me out of my BASIC habits...for that I'm definitely grateful.
Memories Indeed! (Score:3, Interesting)
My never-ending project to simulate a D&D world led me to explore the mysteries of virtual method tables, linked lists, B-trees, and that other structure -- a mesh of nodes without a head -- what was it called?
My favorite TP achievement was a homegrown BBS that I ran for 2 years on my 1200-baud modem. I had no hard drive, just two 360K floppy drives. So the system and programs were on one and the msg files were on the other. There were 10 message boards. I gave some users sysop privs on individual boards. Three of them ran RPGs -- AD&D, Traveller and Robotech -- one woman ran hers as an adults-only hot tub/bar. Eventually I wrote an adventure game parser as a unit that would plug into the BBS. I only created one game for it, but many people played it through to the end and commented on it. Good memories of the pre-web era.
I thought I knew C... (Score:3, Interesting)
Re:I thought I knew C... (Score:3, Interesting)
Borland... (Score:3, Informative)
There is a ton of third party support [torry.net] for it and you can do just about everything a little easier then just about everything else. All my DSOs for Apache are done in Kylix...
Re:Borland... (Score:3, Informative)
I still find it very cool and useful, and I am still using Delphi 7 for Win32. I have avoided Delphi 8 because it was only
One more recollection (Score:3, Interesting)
Well Pascal was at that time really important.
Pascal... (Score:5, Interesting)
Yet, commercial implementations of Pascal were in pretty common use, had all the low-level facilities of C, and yet gave programmers a decent amount of type safety and runtime error checking. In fact, a lot of the early Macintosh software was written in ObjectPascal, and TurboPascal was very popular and very useful on the PC. Even the Apple II ran a pretty good Pascal development environment (in 64k of memory), with a decent screen oriented editor, menu bars, and an integrated compile/edit/run/debug system. Pascal syntax also was quite a bit less error prone than C/C++'s. Having pointer dereferencing be a postfix operator alone is just so much more sensible.
Perhaps much more interesting than Pascal, historically, are Algol-60, Simula-67, and Algol-68, which are related to it; Pascal was probably never intended to compete with them, but rather serve as an educational introduction to them and their successors. Around the same time, many fundamental ideas in programming languages were developed and implemented, including APL, Lisp 1.5, Snobol, PL/I, Smalltalk, and Prolog. Window systems, GUI toolkits, constraint-based programming, MVC, and other concepts we take for granted today followed shortly thereafter.
and Basic too (Score:3, Informative)
THere is a discussion above about production languages vs teaching languages being taught at this time. My opinion being better a production language, because when the Business Admin types take their intor to programmig class they will not be left with the impression that a teaching language is a real programming language.
THen force programmers to
Re:Pascal... (Score:3, Informative)
Niklaus Wirth's languages (Score:5, Informative)
Rather than quick coding by the seat of your pants which C encourages or at least strongly tolerates.
Re:Niklaus Wirth's languages (Score:3, Informative)
I've actually written two commercial applications in Modula-2. Did you know that MetroWerk's CodeWarrior is actually a descendent of their original product (and company name) that was then known as MetCom Modula-2? I still have those books in a box. First language I actually coded in for the Mac. That was in 88.
Function Nesting (Score:3, Insightful)
There's one thing I really miss about Pascal: nested procedures and functions. Being about to write a little utility function in the scope of the function it helps is just so elegant. You don't have to pass a bunch of parameters to get them in scope. Nobody else can miscall your utility function because it's not out in the global namespace. It's immediately clear to people reading your code that it's just a subordinate helper and to which function it belongs.
Function nesting is a feature sorely lacking from languages like C. It's not to hard to work around this limitation in an OO language, but the solution is still not as elegant or efficient.
And even after 15 years of C and C++, it still makes more sense to me to use = for comparison and to have a special symbol like := for assignment.
Re:Bah! (Score:5, Funny)
Today (Score:5, Funny)
Today, we have Python, and whitespace-sensitive code is fucking BACK!
Re:Bah! (Score:3, Informative)
Writing numerical code in octal - I just can't begin to imagine how much talent that took.
Re:Raskin's Pascal poster (Score:3, Informative)
Agreed, but for Pascal you won't run into any constructs that are recognized by the same chunk of "Railroad Normal Form" but which have radically different semantics--over and above the usual things you can't capture in a context-free grammar.
That is, Pascal doesn't have C++'s "if you can interpret it as a declaration, it's a declaration" rule.
From what I've read, C++ has the same