C++ doesn't have:
Contents
ALGOL 68 doesn't have:
Union declaration and use
Assigning values into an A68 union
variable is automatic, the type is "tagged" to the variable, but pulling the value back out is syntactically awkward as a conformity-clause is required.
ALGOL 68 example:
union(int, char) x:=666; printf(($3d l$, (x|(int i):i) ))C/C++ example:
The net effect of "type-tagging" is that Algol68's strong typing "half" encroaches into the union
.
Mode declaration
A new mode (type) may be declared using a mode
declaration:
This has the similar effect as the following C++ code:
Note that for ALGOL 68 only the newtype name appears to the left of the equality, and most notably the construction is made - and can be read - from left to right without regard to priorities.
References
Comparison of ALGOL 68 and C++ Wikipedia(Text) CC BY-SA