lotus



previous page: C08) What is the difference between P and &P?
  
page up: BETA Programming Language FAQ
  
next page: C10) What should I do if the compiler prints "Please report the error to Mjolner Informatics" and stops?

C09) What does "virtual prefix not implemented" mean?




Description

This article is from the FAQ, by with numerous contributions by others.

C09) What does "virtual prefix not implemented" mean?

A couple of typos in the compiler manual [MIA 90-02(1.3) August 1994] for
version v5.0 of the compiler have caused some confusion over this message.
Section 5, item 8 ("Implementation Restrictions") should read as follows:

8. Virtual superpatterns, i.e.,

        A::< (# ... #); (* where A is some virtual *)
        B: A(# ... #);

have not been implemented.

By using a final binding, this limitation can often be overcome
like this:

        A:: (# ... #); (* A is no longer virtual *)
        B: A(# ... #);

The situation may also occur in a more indirect way:

        graph:
          (# node:< (# ... #);
             nodeList: @list(# element::< node #);
             ...
          #);

Here the virtual further binding of element in list is not
allowed, since node is itself virtual.

The next version of the compiler will allow final binding using a
pattern that is itself virtual. That is, you will be allowed to do
this:

        graph:
          (# node:< (# ... #);
             nodeList: @list(# element:: node #);
             ...
          #);

In version 5.0 of the compiler, this situation is not handled
correctly. Instead you can do as follows:

        graph:
          (# node:< (# ... #);
             nodeListElement: (# n: ^node enter n[] exit n[] #);
             nodeList: @list(# element::< nodeListElement #);
             ...
          #);

General virtual prefixes behave much like multiple inheritance and
will not be implemented in the near future.

These errors have been fixed in the manual for the version v5.1 of the
compiler.

 

Continue to:















TOP
previous page: C08) What is the difference between P and &P?
  
page up: BETA Programming Language FAQ
  
next page: C10) What should I do if the compiler prints "Please report the error to Mjolner Informatics" and stops?