Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!buengc!art From: art@buengc.BU.EDU (A. R. Thompson) Newsgroups: comp.lang.pascal Subject: Re: Pascal dying out? Message-ID: <1284@buengc.BU.EDU> Date: 25 Oct 88 19:02:05 GMT References: <267@lafcol.UUCP> <460@ccncsu.ColoState.EDU> Reply-To: art@buengc.bu.edu (A. R. Thompson) Followup-To: comp.lang.pascal Organization: Boston Univ. Col. of Eng. Lines: 107 In article <460@ccncsu.ColoState.EDU> kolb@handel.colostate.edu..UUCP (Denny Kolb) writes: >In article <267@lafcol.UUCP> galvinp@lafcol.UUCP (Galvin Paul ) writes: >> >>.....there is a certain >>element that seems to think that Pascal is dying out. They say that >>in 20 years, it will be long gone. >> >>Is there any basis for this? > > I don't really see anything that would justify that kind of pessimism. > > I have been hearing for at least 10 years now, that FORTRAN is destined for >the 'scrap heap of computerdom', but at last report, it is comming along quite >well. > > Granted, as a 'real world', production language, Pascal leaves much to be >desired. However, Pascal was never intended for an environment such as that. >Pascal is first and formost, a teaching language, and as such it has no equal. >(Would you REALLY want to learn 'C' as a First Language???) The newly proposed Pascal standard fixes up a lot of the problems associated with "production" programming. The major extensions are: Separate compilation (modules), functions that return structured results, direct access files, schemata (replacing the troublesome cantankerous [conformant] array extension of the British Standard and dynamic strings. There are also a number of minor extensions, e.g. "otherwise" clause in case statement, built in imaginary type and more. With the new extended Pascal it should be far more suitable for industrial strength work. Pascal is alive and quite healthy in Europe. The major problem with Pascal, at least as I see it, is the lack of publicity of the standards work. I believe that if more public attention were drawn to the new version we would be seeing a resurgence of interest in what is really a very fine language, far superior to C in my humble opinion (at least once the "teaching only" drawbacks are eliminated). Can somebody on the Pascal committee please bring us up to date on the status of things (Yoo hoo, Bob Dietrich are you listening?) > > I am currently teaching the Intro Pascal course here at CSU, and as a >first language Pascal does remarkably well. Pascal enables the student to learn >the various laguage constructs, such as Looping, Selection, Arrays, Data >Abstraction, etc. Without having to learn all of the extraneous garbage that >generally go along with them in a more conventional language. Here in the College of Engineering at BU we do the same thing and are quite happy with the results. > >>I hardly see anyone who is in the >>business of writing programs or such and I would not be able to >>determine the truth of this. > > I am a little confused as to what you mean by 'in the business', but I assume >that you are refering to the more 'real world' sorts of programming here. > > If this is true, then in this area, I think Pascal is already gone. I doubt >that many, if any, companies involved in large programming projects are actively >using Pascal in their Day-to-Day programming activities. There are several >reasons for this, but primarily, Pascal lacks most of the file handling >capabilities that are essential for any kind of realistic software package. It's quite widely used in Europe. But the limitations of "pure" Pascal are well known and are inhibitory in the context of "real" programming, not just file handling e.g. no real time support, no separate compilation, static arrays etc. With luck the new standard will have eliminated these objections and will lead to a wider use of the language. > > There is a language called Modula-II which was also written by N. Wirth, that >does have these file-handling routines, and other such stuff. I have never >written in M-II, but people who have tell me that it has a syntax that is >very similar to Pascal. Modula-II still tends to be somewhat obscure, so I >have no idea if it has an industial following or not. Modula-II has some drawbacks. I haven't looked at it for a while, so what follows is a bit shaky. MII defines a "word", a sixteen bit pattern of bits. This is unfortunate since in a very real sense it welds a bias toward sixteen bit architectures into the language. It allows structural compatibility of types, which we all "know" is immoral. The biggest sin MII commits is, however, its definition of "modules" inside of procedures. This is unfortunate since it makes modules subject to the dynamic comings and goings of procedures. That is, given the definition of the lifetime of a procedure, a module exists while its defining procedure is active and ceases to exist when that procedure is exited. If you view a module (as most do) as a fixed component, analogous to a transistor, this makes no sense. The transistor is always there even if it's not being used, it doesn't come into existence when needed and then disappear. So modules should always exist, even if they are only used inside of one or more procedures. A better way is to define modules that define procedures as their components instead of the other way around. This allows the language to define "abstract data types", a collection of values (types) and the operations valid over those values. An example would be a module that defines a type "stack", (a linear data structure with insertions and deletions allowed only at one end), the operations "push" and "pop" and the boolean variables "full" and "empty" plus whatever other housekeeping is deemed necessary. The interested readers are referred to DeRemer and Kron's classic paper "Programming in the Large Versus Programming in the Small" 1976 IEEE Transactions on Software Engineering (exact vol, pages etc not at hand, sorry) for a thorough discussion of the differences between static and dynamic objects in programs and the need for different languages to express these very different concepts. It turns out that it is possible to define a static structure definition language that (when coupled with Pascal as the language for programming in the small) allows Pascal to be used as an object oriented language. Neat huh?