Basic Pascal Tutorial/History/ja

From Lazarus wiki
Revision as of 12:25, 19 June 2015 by Derakun (talk | contribs)
Jump to navigationJump to search

Template:Object Pascal History

歴史 (原著者: Tao Yue, : 修正あり)

   1 起源
   2 Wirth による Pascal の考案
   3 UCSD Pascal
   4 Pascal が標準となる
   5 拡張
   6 世界の変化
   7 Pascalを学ぶ利点は何か?


起源

PascalはALGOLから派生した。ALGOLは科学計算のためのプログラミング言語であった。チューリッヒでの会合で国際委員会はプラットフォームから独立な言語としてALGOLをデザインした。この結果、ALGOLにデザインできる特徴について比較的束縛から自由になった。しかし、同時にそのためのコンパイラを書くことはより難しくなった。当時は、多くのコンピュータに私たちが今は当然と思っているハードウェアの性質がない時代だった。多くのプラットフォームでコンパイラがないこと、そしてポインターがないこと、さらに文字記号のような基本的なデータタイプがないことも相まってALGOLは広く受け入れられるものにはならなかった。科学者やエンジニアは多くのプラットフォームで利用できたプログラミング言語であるFORTRANのところに集まっていた。ALGOLはアルゴリズムを記述する言語として利用される以外はほとんど消え去ったのである。

Wirth による Pascal の考案

1960年代に何人かのコンピュータ科学者がALGOLを拡張する作業をはじめた。その中の一人がDr. Niklaus Wirthであった。彼はスイス連邦工科大学 (the Swiss Federal Institute of Technology :ETH-Zurich)に所属し、ALGOLを最初に作り出したグループの一人でもあった。1971年に彼は多くの点でALGOLに似た高度に構造化された言語の仕様を発表した。17世紀のフランスの哲学者で、同時に数学者であり、動作する機械的なデジタルコンピュータを組み立てたPascalの名前をとって、彼はそれをPascalと名付けた。

Pascalは非常にデータ指向なので、プログラマーは好みのデータタイプを定義することができる。この自由さと同時に厳密なタイプチェックが行われるため、データタイプがごちゃまぜになることはない。 Pascalは教育用言語を意図としており、実際その目的で広く採用された。 PascalはFORTRANと違って自由な書き方ができ、自然言語のように読みやすく、書かれたコードは理解しやすい。 UCSD Pascal

ALGOLを殺した原因の一つはコンパイラを作る困難さにあった。Dr. Wirth はPascalコンパイラに中間の、プラットフォームに依存しないオブジェクトコード段階をコンパイルさせることで、これを避けた。別なプログラムがこの中間コードを実行コードに変換したのである。

カリフォルニア大学サンディエゴ校(the University of California at San Diego :UCSD)の Ken Bowles 教授はこの提供されたチャンスを利用して Pascalコンパイラを Apple II、それはその当時もっとも人気のあったマイクロコンピュータであった、に移植した。 UCSD P-System は標準となり、多くの大学で広く使われた。 これはFORTRANのような他の言語を走らせるために必要だった大型計算機のコストとApple IIの低コストを比較する手助けとなった。 コンピュータ界におけるそのインパクトはIBMの革命的なパーソナルコンピュータの広告の中に見ることができる。その広告では、そのパーソナルコンピュータが3つのオペレーティングシステム、すなわちデジタルリサーチ社のCP/M-86、Softech社の UCSD P-system,そしてMicrosoft社のPC-DOSをサポートしていることを自慢していたのである。 Pascal が標準となる

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. [edit] 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. [edit] 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 took a heavy hit in the 90s when several large companies focused on other programming languages. Microsoft for example focused on Visual Basic and C, and Apple migrated it's APIs from Pascal to C and later to Objective C. Despite the lack of support from operating system producers, Pascal still retained a large following through Delphi and Free Pascal. [edit] So what are the advantages of learning Pascal?

Despite having lost its previous position of dominance, Pascal is still quite useful, one of its advantages being that it has a very clear syntax which uses common words, such as begin/end, to express concepts, making its code easier to read and maintain.

Another reason: speed and size. Pascal compilers are lightning-fast and Delphi and Free Pascal are no exceptions. While C programmers might wait for hours, Pascal programmers have to wait only 1 minute for a program of a similar size. Besides that the Pascal IDEs are still leaders in terms of productivity in the world through the Delphi IDE and the Lazarus IDE.

Also, Pascal remains preferred at many universities. 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 Pascal is easier to learn than C/C++.

Today Pascal retains a niche in the market through Delphi, Free Pascal and Lazarus. Many small-scale freeware, shareware, open-source and commercial programs are written in Pascal/Delphi. So enjoy learning it. It's a great introduction to computer programming. It's not dangerous like C, confusing like C++, or slow like Java.