3

At the end of the answer to "Can I do ++x and x++ in Python?" on this page: http://norvig.com/python-iaq.html, you can read:

[...] I'm with my fellow Dane, Bjarne Stroustrup, on this one. He said in The Design and Evolution of C++ ``If I were to design a language from scratch, I would follow the Algol68 path and make every statement and declaration an expression that yields a value''.

Why?

  • 4
    You mean why Bjarne would do that if he designed a language from scratch? You'll have to ask him. – user7043 Jul 14 '13 at 9:05
3

As with any design, removing exceptional scenarios makes for a cleaner design - those branches interact with the rest of the design causing cascading impacts. By allowing all expressions (and statements) return a value (even if that value is unit) allows the design to be simpler. Further, it allows you to get functionality for "free" without having to make specialized versions for statements versus expressions.

3

The main aims and principles of design of ALGOL 68:

  1. Completeness and clarity of description
  2. Orthogonal design,
  3. Security,
  4. Efficiency:
    • Static mode checking
    • Mode-independent parsing
    • Independent compilation
    • Loop optimization
    • Representations - in minimal & larger character sets

0.1.2 Orthogonal design

The number of independent primitive concepts has been minimized in order that the language be easy to describe, to learn, and to implement. On the other hand, these concepts have been applied "orthogonally" in order to maximize the expressive power of the language while trying to avoid deleterious superfluities.

ALGOL 68 was the first (and possibly one of the last) major language for which a full formal definition was made before it was implemented.” — C.H.A. Koster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.