Cover

M Language Changes Coming in Next CTP

May 22, 2009
No Comments.

If you haven’t been following the new Specification for the M Language that the Oslo team has been cooking up, they have been making changes in response to feedback about the language.  These changes will come to light in the next CTP.  These changes are;

‘=>’ as label binding operator

The label binding operator has changed from ‘=’ to ‘=>’.

@[] as escape for verbatim identifier names

Identifier names that need to be escaped use ‘@[]’ instead of ‘[]’

‘about’ operator

about’ is an operator that returns data for M identifiers (e.g., extents, type declarations, computed value declarations)

‘item’ removed

‘item’ is no longer a keyword used to iterate over a collection of collection of values. Instead, use ‘value’ to iterate over a collection, and ‘value’ plus parenthesis to iterate over a collection of collection.

‘into’ removed

‘into’ has been removed as a keyword with the ‘join’ and ‘group by’ query clauses.

‘this’ removed

‘this’ has been removed as a keyword that refers to all of the members of an entity type declaration. Instead, constraints now must be written after the member declarations and use ‘value’ to reference members.

Decimal without preceding 0

Decimals of the form ‘0.xxx’ no longer require the preceding 0.

DateTimeOffset type and literal value added

A new data type, DateTimeOffset, has been added. In addition, a new literal kind, DateTimeOffset, has been added to write literals of the type DateTimeOffset

# undef removed

‘#undef’ has been removed from the supported set of preprocessor directives

Preprocessor scope changes

‘#define’ must occur before any conditional operator ‘#define’ is scoped to a compilation unit, not a source file

Text patterns defined

Text value patterns are now defining including literals, character classes/ranges, repitition operators, ‘any’, ‘empty’ and ‘error’ keywords, and text pattern operators difference, intersect and inverse.

Productions defined

Productions are defining including pattern and token declarations, constructors, precedence rules, and constructor operators.

Rules defined

Rules are defining including token rules, syntax rules, interleave rules, and parameterized rules

Language defined

Language is defined

Binary literal syntax change

The literal syntax for binary has changed from \xNNNN to 0xNNNN.

binary shift operators removed

The binary shift operators (<< and >>) have been removed from the language.

Entity type computed value declarations removed

Entity types can no longer have computed value declarations

where/select become Where/Select

Where and Select query expression clauses now have the first character capitalized

Identity selector supports multiple fields

The identity selector now supports using more than 1 field as the identity to select an instance

extern

Extern is now supported for computed values and extent declarations

name overloaded changes

Now, within a module, computed values, extents and types must not have same names, where as before only computed values and extents could not have same names.

**‘.’ leading dot identifier **

A leading dot identifier ‘.’ can be used to scope the remaining dotted identifiers to the current module rather than the current lexical scope

‘::’ scope identifier

The scope identifier ‘::’ constructs a fully qualified identifier name with the module name to the left of the operator, and the module’s member name to the right.

Attributes defined

Attributes as used by Mgrammar declarations is defined

Catalog definitions

The M catalog written in M is defined

SQL mapping

The M-to-SQL mapping is defined