Skip to content

Not Adopted

Benjamin Kowarsch edited this page May 15, 2023 · 5 revisions

Syntax that has been considered during the revision but has not been adopted.

Exponentiation Operator

x := y ** z;

Rejected due to exponentiation being right associative, which makes implementation a lot more involved than it seems.

Using || for Concatenation

Rejected due to lack of clarity. The ampersand symbol & was chosen because it is less ambiguous.

Using // as Quote Alternative

str := //Fred said "I don't know".\n//;

Rejected because string literals containing both single and double quotes can be produced via string concatenation.

str := 'Fred said "' & "I don't know" & '".\n';

Conditional Compilation

<*IF arch = arm64*>
(* code *)
<*ELIF arch = x86*>
(* code *)
...
<*ENDIF*>

Rejected because it creates unreadable and unmaintainable source code. Architecture or platform specific variants should ALWAYS be furnished as separate architecture or platform specific library modules. These can easily be generated from a common source template and then be chosen accordingly by the build system.

Multiple Function Results

PROCEDURE fooBar ( bar : Bar ) : Foo, Status;

(* then *)

foo, status := fooBar(bar);

This will be revisited in the future.

Procedure Local Exception Handling

PROCEDURE Foo : Status;
VAR status : Status;
BEGIN
  Step1;
  IF status = Status.Failure THEN BAIL(1) END;
  Step2;
  IF status = Status.Failure THEN BAIL(2) END;
  Step3;
  IF status = Status.Failure THEN BAIL(3) END;
  (* procedure returns here *)
  RETURN Status.Success
BAILOUT
| 3 : UndoStep3;
| 2 : UndoStep2;
| 1 : UndoStep1;
  (* procedure exits here *)
  RETURN Status.Failure
END Foo;

This will be revisited in the future.

Clone this wiki locally