The Advantages of ABC as an Introductory Programming Language

ABC leaves time to teach the principles

With a programming language like Pascal, the experience is that most of the time in class is spent on the details of the language, leaving too little time to teach about what really matters: the principles of programming. Quite possibly, a one-term course may not even get round to introducing pointers. With ABC, the full language can be covered in a few hours, leaving ample time to treat interesting and instructive examples of programming in detail.

ABC is good for teaching the principles

Unlike BASIC, ABC is a language that offers strong support for structured programming, even better than Pascal. Refinements, for top-down stepwise program development, are an integral part of the language. Because of the powerful data-types of ABC, including tables (associative arrays), algorithms can be written at a problem-oriented level of abstraction. There is no GOTO statement in ABC, and expressions do not have side-effects.

ABC lets you choose interesting examples

With many other languages, including BASIC and Pascal, it is always hard to pick interesting examples. Especially early in the course, when only numeric types and arrays have been introduced, it is very problematic to handle more challenging problems than say computing the average of a sequence. The lack of procedures at the early stages may also cause the students to develop bad programming habits. With ABC, you can treat interesting examples right from the start. Programming problems involving texts (strings) are as easy to solve in ABC as problems with numbers. Programs in ABC are often five to twenty times as short as their counterparts coded in BASIC or Pascal. There is no distinction whatsoever in ABC between a program and a procedure.

ABC allows you to set challenging assignments

For basically the same reasons, you can set assignments you would not even think about if the students had to program in BASIC or Pascal. Here are some examples of instructive problems that students can solve after only a few weeks, using ABC:

ABC is student-friendly

ABC is fully interactive, doing away with the edit-compile-run cycle. The language has strong type checking without declarations. The error messages are to the point and self-explanatory, both for syntax and for run-time errors, always showing the spot in the source program where the error occurred. The dedicated editor of ABC, which knows the ABC syntax and which has a multiple UNDO, greatly reduces both the opportunities for making syntax errors (no more unbalanced parentheses) and the time needed for entering a program, thus demanding less time from the instructor for helping with trivial problems. ABC programs are automatically displayed pretty-printed, with indentation showing the logical grouping. The ABC environment is persistent, meaning that variables (including tables) survive a session and remain accessible until explicitly deleted.