Design‎ > ‎

Goals

More or less in order of importance.

1. Easy to read back and understand

Code is read at least 10 times more often than it's written.  Even when creating a program one reads back the text several times to check if it looks OK.  Therefore code must be very easy to read back, and this may go at the cost of more time spend on entering the text.

Key to good readability is a good mix of text and symbols.  Too much text makes you need to read it (Cobol).  Too many symbols makes it cryptic (Perl).

It also helps to use one style.  Either by force, disallowing style that looks bad, or by making it easy to write in a nice style.

Meaning of words in the language should be close to what they mean in English.  For example "virtual function" can only be understood after studying OO terminology.  "default function" does have a meaning, it avoids required knowledge.

2. Learn from experience

See the Inspiration page.

3. Reliability

The number of bugs in a program is directly related to how easy it is do write good code.  If one has to write lots of tests to avoid problems (C++) basic reliability will still be low.

Type checking helps a lot.  Java is a good example here.  However, this conflicts with easy of use (e.g., Python).  It should work to encourage type checking, but make it possible to do without.

Programmers make mistakes.  Over time we have learned what the common mistakes are.  The language should be designed so that common mistakes result in a compiler error, so that they are found early.

4. Performance

If one has a very nice language that is too slow, it won't be used.  And "too slow" quickly means slower than others.  That is why C and C++ are often favored above Python and Java.

5. Portability

A program must be able to run on many different systems without changing it. This not only means the compiler is available, but also that the libraries are portable.

The language should solve portability problems.  Avoid having every programmer work around differences, do it once for all.

6. Tools support

Progamming tools are essential.  The language should make it easy, or at least possible, to have tools do such things as:
- reformatting
- auto-indenting
- refactoring
- automatic completion
- looking up documentation