Object Pascal History/es

From Lazarus wiki
Jump to: navigation, search

Deutsch (de) English (en) español (es) français (fr) italiano (it) 日本語 (ja) 한국어 (ko) русский (ru) 中文(中国大陆)‎ (zh_CN)

Historia

   (autor: Tao Yue, state: sin cambios)

Orígenes

   Pascal surgió de ALGOL, un lenguaje de programación destinado a la computación científica.

   Reunido en Zurich, un comité internacional decidió que ALGOL sería un lenguaje independiente de la plataforma. Esto dio cierta libertad sobre las características que podrían tener ALGOL, pero también hizo más difícil escribir compiladores para él. En esos días, muchos equipos carecían de las características de hardware que ahora damos por sentadas.

   La falta de compiladores en muchas plataformas, combinado con la carencia de punteros y muchos tipos de datos básicos, como los de texto (characters), llevó a ALGOL a no ser ampliamente aceptado. Los científicos y los ingenieros acudían en cambio a FORTRAN, un lenguaje de programación que está disponible en muchas plataformas. ALGOL desapareció para la mayoría, excepto como un lenguaje para describir algoritmos.

Wirth crea Pascal

   En la década de los 60, varios científicos de la computación trabajaron en la ampliación de ALGOL. Uno de ellos fue el Dr. Niklaus Wirth, del Instituto Federal Suizo de Tecnología (ETH-Zurich), integrante del grupo original que creó ALGOL. En 1971, publicó su especificación para un lenguaje altamente estructurado, que se parecía a ALGOL en muchos aspectos. Lo llamó Pascal en honor del filósofo y matemático francés del siglo XVII, Blaise Pascal, que construyó un aparato mecánico de cáculo (Pascalina).

   Pascal es muy orientados a datos, dando al programador la capacidad de definir tipos de datos personalizados. Dada esta libertad tiene un estricto control de los tipos de datos, que impide que estos se mezclen. Pascal fue concebido como un lenguaje de enseñanza y fue ampliamente adoptado como tal. Pascal es de flujo libre, a diferencia de FORTRAN, y se lee como un lenguaje natural, haciendo muy fácil entender el código escrito en él.

UCSD Pascal

   Una de las cosas que terminaron con ALGOL, fue la dificultad de crear un compilador para este. El Dr. Wirth evitó esto haciendo que su compilador Pascal recopilara una etapa de código de objeto intermedia, independiente de la plataforma. Otro programa convirtió este código intermedio en código ejecutable.

   El profesor Ken Bowles de la Universidad de California en San Diego (UCSD) aprovechó la oportunidad que ofreció para adaptar el compilador Pascal al Apple II, el microordenador más popular del día. UCSD P-System se convirtió en un estándar, y fue ampliamente utilizado en las universidades. Esto, ayudado por el bajo costo de Apple II en comparación con mainframes, que eran necesarios en el momento para ejecutar otros idiomas como FORTRAN. Su impacto en la informática se puede ver en los anuncios de IBM para su revolucionario Personal Computer, que se jactaba de que el PC soportaba tres sistemas operativos: CP / M-86 de Digital Research, UCSD P-System de Softech y PC-DOS de MicroSoft.

Pascal Becomes Standard

   By the early 1980's, Pascal had already become widely accepted at universities. Two events conspired to make it even more popular.

   First, the Educational Testing Service, the company which writes and administers the principal college entrance exam in the United States, decided to add a Computer Science exam to its Advanced Placement exams for high school students. For this exam, it chose the Pascal language. Because of this, secondary-school students as well as college students began to learn Pascal. Pascal remained the official language of the AP exams until 1999, when it was replaced by C++, which was quickly replaced by Java.

   Second, a small company named Borland International released the Turbo Pascal compiler for the IBM Personal Computer. The compiler was designed by Anders Hejlsberg, who would later head the group at Microsoft that developed C# and (re)introduced Managed Code back to the world of computing.

   Turbo Pascal was truly revolutionary. It did take some shortcuts and made some modifications to standard Pascal, but these were minor and helped it achieve its greatest advantage: speed. Turbo Pascal compiled at a dizzying rate: several thousand lines a minute. At the time, the available compilers for the PC platform were slow and bloated. When Turbo Pascal came out, it was a breath of fresh air. Soon, Turbo Pascal became the de facto standard for programming on the PC. When PC Magazine published source code for utility programs, it was usually in either assembly or Turbo Pascal.

   At the same time, Apple came out with its Macintosh series of computers. As Pascal was the preeminent structured programming language of the day, Apple chose Pascal as the standard programming language for the Mac. When programmers received the API and example code for Mac programming, it was all in Pascal.

Extensions

   From version 1.0 to 7.0 of Turbo Pascal, Borland continued to expand the language. One of the criticisms of the original version of Pascal was its lack of separate compilation for modules. Dr. Wirth even created a new programming language, Modula-2, to address that problem. Borland added modules to Pascal with its units feature.

   By version 7.0, many advanced features had been added. One of these was DPMI (DOS Protected Mode Interface), a way to run DOS programs in protected mode, gaining extra speed and breaking free of the 640K barrier for accessing memory under DOS. Turbo Vision, a text-based windowing system, allowed programmers to create great-looking interfaces in practically no time at all. Pascal even became object-oriented, as version 5.5 adopted the Apple Object Pascal extensions. When Windows 3.0 came out, Borland created Turbo Pascal for Windows, bringing the speed and ease of Pascal to the graphical user interface. It seemed that Pascal's future was secure.

The World Changes

   However, this was not to be. In the 1970s, Dennis Ritchie and Brian Kernighan of AT&T Bell Laboratories created the C Programming Language. Ritchie then collaborated with Ken Thompson to design the UNIX operating system. At the time, AT&T had a government-sanctioned monopoly on telephone service in the United States. In return for the monopoly, its telephone business was regulated and it was prohibited from entering the computer business. AT&T, seeing no market for a research operating system, gave UNIX away to universities for free, complete with source code.

   Thus, a whole generation of computer science students learned C in their university courses on languages and operating systems. Slowly but surely, C began to filter into the computer programming world.

   Pascal was finally killed by object orientation and the move to Windows on the industry-standard PC platform. In the 1980s, Bjarne Stroustrop, also of Bell Labs, popularized object-orientation by developing C++, which kept the familiar syntax of C while extending it for object orientation. C++ came to define object orientation to a generation of programmers, and remains a strong force even today.

   Also in the 1980s, Microsoft Windows adopted C as its standard programming language. In contrast to MacOS and Pascal, the Windows API samples were all in K&R (pre-ANSI) C, complete with variable lists after the function prototype. As object orientation and Windows took hold, the natural language for applications migrating to Windows was C++.

   Many colleges and universities moved away from Pascal, choosing C++ or newer languages for their programming courses. Finally, the AP exam moved to C++, ending Pascal's dominance in American high schools.

So Why Learn Pascal?

   Despite its fading away as a de facto standard, Pascal is still quite useful. C and C++ are very symbolic languages. Where Pascal chooses words (e.g. begin-end), C/C++ instead uses symbols ({-}). Also, C was designed for systems programming. In Pascal, mixing types leads to an error and is very infrequently done. In C/C++, type-casting and pointer arithmetic is common, making it easy to crash programs and write in buffer overruns. When the AP exam switched to C++, only a subset of C++ was adopted. Many features, like arrays, were considered too dangerous for students, and ETS provided its own "safe" version of these features.

   Another reason: speed and size. The Borland Pascal compiler is still lightning-fast. Borland has revitalized Pascal for Windows with Delphi, a Rapid-Application-Development environment. Instead of spending several hours writing a user interface for a Windows program in C/C++, you could do it in ten minutes with Delphi's graphical design tools. Delphi is to Pascal what Visual BASIC did to BASIC. Borland is still developing Delphi, and the open-source community has created a largely Borland-compatible compiler called Free Pascal.

   Also, Pascal remains preferred at many universities, especially in areas where students are first exposed to computers at school rather than at home. In addition, Pascal was well-suited for teaching programming, and remains so. There is less overhead and fewer ways for a student to get a program into trouble. For teaching simple procedural programming, Pascal remains a good choice. Pascal has hung on longer in education outside the United States, and remains an official language of the International Informatics Olympiad. A basic programming background is useful in many technical occupations, and the overhead of learning an object-oriented language is not necessarily the best application of resources.

   Thus, even after C, C++, and Java took over the programming world, Pascal retains a niche in the market. Many small-scale freeware, shareware, and open-source programs are written in Pascal/Delphi. So enjoy learning it while it lasts. It's a great introduction to computer programming. It's not scary like C, dangerous like C++, or abstract like Java. In another twenty years, you'll be one of the few computer programmers to know and appreciate Pascal.


previo índice siguiente