L25) What is the exact qualification rules for nested patterns?
Description
This article is from the FAQ, by with numerous contributions by
others.
L25) What is the exact qualification rules for nested patterns?
In Chapter 8 on Block Structure in the BETA book it is (in section 8.2) said
that patterns like Pascal.Symbol and Simula.Symbol are different. The
corresponding declarations are as follows
Grammar: (# ...; Symbol: (# ... #); ... #);
Pascal: @Grammar;
Simula: @Grammar;
The current implementation does, however, not consider nested patterns like
Pascal.Symbol and Simula.Symbol to be different. The reason for this is
historical.
Qualification check was implemented in two stages. First the compile-time
checks were implemented, and next the run-time checks. The qualification
rules for run-time checking were implemented such that nested pattern like
Pascal.Symbol and Simula.Symbol are identical.
This is a relaxation of the proper run-time qualification rule (as defined
by the BETA language), and a future release of the MBS will properly
implement run-time qualification check.
 
Continue to: