Skip to content

SpecificationIX · Objects

9.7

What classes do not have

PseudoLearn deliberately leaves out some pieces of other object languages, and when it recognises them it explains so with a message of its own.

Markdown version

9.7.1 How it works

These constructs are not part of the current edition:

ConstructDiagnostic
abstract classes and methodsunsupportedAbstractConstruct
static membersunsupportedStaticConstruct
protected visibilityunsupportedProtectedConstruct
exception handling with blocksunsupportedExceptionConstruct
Figure 9.7-1.The four constructs that are recognised to explain that they do not exist, and what PseudoLearn offers instead.

Four constructs that do not exist, each with its alternative: abstract classes versus interfaces, static members versus parameters, protected versus Public and Private, and exceptions versus Result.

The engine recognises their typical forms only in a structural position —for example, one more word in a class header— and gives a teaching message instead of a generic error. Those words are not reserved: they can be used as names anywhere else.

ProgramA static member

Class Contador
  Estatico Define total As Integer;
EndClass

Algorithm Mal
EndAlgorithm

Diagnostics

  • unsupportedStaticConstruct · error · 2:3 · Static members are not supported in PseudoLearn

The program finishes with an error.

For expected errors, the language uses values: Optional and Result. To share data between objects, it is passed as parameters.

In short

  • There are no abstract classes, static members, protected or exceptions.
  • Their typical forms produce a message of their own.
  • Those words remain valid names.