15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

58<br />

Teaching Languages<br />

Without even knowing much about <strong>programming</strong>, you can figure out what<br />

the preceding Pascal program does, just because Pascal commands consist<br />

of descriptive words. Now take a look at the equivalent C program, which is<br />

fairly easy to understand, but littered with cryptic characters and symbols:<br />

#include <br />

main()<br />

{<br />

printf (“Hello World!\n”);<br />

}<br />

Although Pascal combined the best features from BASIC and C, Pascal’s<br />

popularity also plummeted because of these similarities, too.<br />

BASIC started adopting structured <strong>programming</strong> techniques, which made BASIC<br />

easier to understand than Pascal but just as easy to write organized programs<br />

like Pascal. On the other extreme, C started adopting similar structured <strong>programming</strong><br />

techniques as well, so you had the power of C with nearly all the<br />

advantages of structured <strong>programming</strong> emphasized by Pascal. Given a choice<br />

between using Pascal, which was almost as easy to use as BASIC and almost<br />

as powerful as C, or using BASIC (which was easier to figure out than Pascal)<br />

or C (which was more powerful than Pascal), programmers found few reasons<br />

to use Pascal any more.<br />

Despite Pascal’s fading popularity, you can still understand Pascal as a first<br />

language and then find a job writing and modifying Pascal programs.<br />

However, Pascal programmers aren’t in as much demand as C programmers,<br />

so study Pascal to better understand good <strong>programming</strong> principles and then<br />

apply those skills to writing programs in other languages.<br />

The inventor of Pascal, Niklaus Wirth, eventually created an improved version<br />

of Pascal dubbed Modula-2. The U.S. Department of Defense created a similar<br />

<strong>programming</strong> language, called Ada, which was also based on Pascal. Like<br />

Modula-2, Ada was designed to encourage structured <strong>programming</strong> and<br />

allow programmers to create and manage large programs by storing subprograms<br />

in separate files called modules (in Modula-2) and packages (in Ada).<br />

Other teaching languages<br />

Although BASIC, Logo, and Pascal may be the more popular teaching languages<br />

available, plenty of other people have created their own languages to<br />

teach people how to program a computer. Because these languages are<br />

developed by individuals or companies, they’re proprietary languages — a<br />

single company or individual controls the language. (In comparison, languages<br />

like BASIC, Logo, and Pascal all have official “standards,” although<br />

most companies that offer BASIC, Logo, or Pascal compilers often deviate<br />

from the official “standard” anyway.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!