General Notes

Anything that exists in RBD but isn't mentioned here is not included in EDT. Or maybe we forgot about it. Nobody's perfect.

The work in the Core category includes the parser, model, and validation.

The work in the JavaScript, Java, and Debug categories includes both the generator and runtime.

Text with an orange background shows differences in features supported by both EDT and RBD.

Developers: include a link to Bugzilla for features not done yet, and mark items "Done" when you're finished.

Table 1: Part Types

Part Types

Core

JavaScript

Java

Debug

DataItem1

Function2, 5

Top-level function2, 5

Delegate2

Record

Structured Record

N/S

N/S

N/S

ExternalType

Handler

Library

Service

Interface3

Enumeration

Program4

N/S

Array

Nullability6

DataTable

N/S

N/S

N/S

Form

N/S

N/S

N/S

Notes on Table 1

In RBD a DataItem can only be used for primitive types. In EDT it can be used for any type.

See also Table 2: Function Parameters.

Interfaces can be implemented by services and handlers (every kind of "logic part" which can be instantiated).

There are no called programs in EDT. Use libraries for "local calls" and services for "remote calls".

We intend to support function overloading in all implementations, even JavaScript.

Nullability means that a variable may really be null. It's not an "I'm null" flag like in RBD. A NullValueException will be thrown if you try to access a field or function of a null variable, even a record. A NullValueException will be thrown if a null variable is an operand to a math operator, an array access, a substring access, a comparison, or a bitwise operator. The string concatenation operators will work the same as in RBD with respect to nulls. :: treats null as the empty string, and ?: results in null if either operand is null. A question mark won't be allowed on the second operand of the AS and ISA operators (the name of the type).

Table 2: Function Parameters

Function Parameters

Core

JavaScript

Java

Debug

In1

Out

Inout1

Ellipsis

Const

Field

N/S

N/S

N/S

SqlNullable

N/S

N/S

N/S

Notes on Table 2

The default parameter modifier is In for references and Inout for values.

Table 3: Primitive Types

Primitive Types

Core

JavaScript

Java

Debug

Any

Boolean

Dictionary

String(N)1

String2

Timestamp3

Blob

N/S

Clob

N/S

Smallint

Int

Bigint

Decimal(N,M)

Decimal(N)

Decimal4

Float

Smallfloat

Number5

Bytes(N)6

Bytes7

Arraydictionary

N/S

N/S

N/S

Char

N/S

N/S

N/S

Dbchar

N/S

N/S

N/S

Mbchar

N/S

N/S

N/S

Unicode

N/S

N/S

N/S

Hex6

N/S

N/S

N/S

Date3

N/S

N/S

N/S

Time3

N/S

N/S

N/S

Interval3

N/S

N/S

N/S

Bin

N/S

N/S

N/S

Num

N/S

N/S

N/S

Numc

N/S

N/S

N/S

Pacf

N/S

N/S

N/S

Money

N/S

N/S

N/S

Notes on Table 3

String(N) is a reference type in EDT.

String is a reference type in EDT.

Timestamp is the only supported date/time type. Use it in place of RBD's date, time, and interval. Date/time math produces timestamps or numbers.

Decimal with no length or decimals is a reference type with an immutable value.

Number is a reference type with an immutable value. Unlike in RBD, number variables can be declared anywhere a variable declaration is allowed.

Bytes(N) is a value type similar to RBD's hex. N indicates the number of bytes in the value. (In RBD, the length of a hex is the number of nibbles not the nubmer of bytes.)

Bytes with no length is a reference type with an immutable value of any length.

Table 4: Statements

Statements

Core

JavaScript

Java

Debug

Variable declaration5

Const declaration

Assignment

Move1

Return

Function invocation

Call2

Label

Transfer

N/S

Throw

Try

Case

If

While

For

Foreach3

Exit

Continue

Empty statement (a semicolon)

Add

N/S

Close

N/S

Delete

N/S

Get

N/S

Replace

N/S

Execute4

N/S

Prepare4

N/S

Open4

N/S

FreeSQL4

N/S

Goto

N/S

N/S

N/S

Set

N/S

N/S

N/S

Converse

N/S

N/S

N/S

Display

N/S

N/S

N/S

Print

N/S

N/S

N/S

Forward

N/S

N/S

N/S

Show

N/S

N/S

N/S

OpenUI

N/S

N/S

N/S

Notes on Table 4

EDT won't support every variation of RBD's move statement. There will be support for move byName, move for, and move for all. A move statement without one of the additional keywords is only allowed between two references, and it results in the target being assigned a copy of the source's value. If/when we support structured records, we might not support move byName on them because of the complex (unclean) design.

EDT doesn't have called programs, but services and native programs can be called.

EDT's foreach statement will support iterating over an array.

Support for these statements is tentative, pending the design for JPA in EDT.

New syntax will allow setting annotations on declarations without the use of curly braces. In RBD we usually do x int {myAnnotation = 3}; but another way to do the same thing is x int {@myAnnotation{3}};. In EDT we will allow that to be outside of curly braces and before the declaration, for example @myAnnotation{3} x int;.

Table 5: Literals

Literals

Core

JavaScript

Java

Debug

null

boolean1

integer2

fixed-decimal3

floating point

string4

bytes5

array

char

N/S

N/S

N/S

mbchar

N/S

N/S

N/S

dbchar

N/S

N/S

N/S

hex

N/S

N/S

N/S

Notes on Table 5

As in RBD, there are four boolean literals: true false yes no

Integer literals have 1-32 digits, an optional leading sign, and no decimal point. The type of the literal depends on the value. If the value fits in a smallint, then the type is smallint. If the value doesn't fit in a smallint but it does fit in an int, then the type is int. Similarly for bigint. If the value is too large for a bigint, then the type is decimal(X), where X is the number of digits in the value.

Fixed-decimal literals have 1-32 digits, an optional leading sign, and a decimal point. At least one digit must follow the decimal point, but it's permissible to have no digits before the decimal point. The type of a fixed-decimal literal is decimal(X,Y), where X is the total number of digits and Y is the number of digits to the right of the decimal point.

String literals are enclosed in double quotes. An optional ux prefix may appear before the opening double quote. The ux prefix means the string is defined as Unicode codepoints in hexadecimal. For example "012" and ux"003000310032" have the same value. The letters u and x may be in any case.

A bytes literal is written as 0x or 0X followed by an even number of hexadecimal digits. For example 0x03AB is a literal whose type is bytes(2).

Table 6: Operators and expressions

Operators and expressions1

Core

JavaScript

Java

Debug

. (member access)

=

function invocation

new

{ } (set-values block)

@

[ ] (array access)

[ ] (dynamic access)

[ ] (substring)2

isa3

as3

unary (+ - ! ~)4, 5

math (+ - * / % **)

assigning math (+= -= *= /= %= **=)

::

?:

logical (And Or && ||)

comparison (< > <= >= == !=)

bitwise (& | Xor << >> >>>)4, 5

assigning bitwise (&= |= Xor= <<= >>= >>>=)4, 5

if-then-else (condition ? val1 : val2)6

in7

N/S

N/S

N/S

like matches8

N/S

N/S

N/S

Notes on Table 6

We'll document error conditions of operators and expressions, and their resulting exceptions. Whenever possible this documentation will be comments in the EGL source file for a type.

Substrings are immutable, so they can't be the target of an assignment or the argument to an inout parameter.

The type cannot be a nullable type. Nullability is not part of a type signature.

There are new bitwise operators in EDT. ~ is a bitwise NOT (also called the compliment), << is a left shift, >> is a right shift where the leftmost bits become zero, >>> is a right shift where the sign is copied into the leftmost bits.

Bitwise operators are only supported on int, bigint, and smallint.

The if-then-else operator is borrowed from languages like C and Java. The condition's type must be boolean. The two values must have the same type.