In this article I describe main changes in X++ language for AX 7. Almost changes were appear because of IDE Visual Studio.
No more p-code
1. In AX 7 the new X++ compiler generates CIL only
2. Compiled X++ code now runs exclusively as .NET CIL
3. CIL runs much faster
Enhancements to X++
1. try … catch … finally
2. Initialize class’s field in the field’s declaration statement.
3. Declare variables in smaller scopes, not just at the start of methods.
4. var keyword is available as a shortcut that allows the compiler to infer the type of the declared variable.
5. A class’s fields can be static.
6. An attribute decoration can omit suffix of attribute name if suffix is "Attribute".
Backward-incompatible changes to X++
1. No longer part of the X++ language (compile error) - changeSite, pause, window
2. The keywords client and server will be ignored, because all compiled X++ code is executed as .NET CIL on the server.
3. CIL helper methods have been removed.
4. AX 7 eliminates the concept of AOT > Jobs. Instead use static main method of a class, and then set the class as the startup object from the AX7 project.
5. Use const type instead macros.
AX7 LINQ Provider for use in C#
Language Integrated Query (LINQ) is a set of classes and methods that enable you to access data that is stored in a variety of places and formats.
When very few records are fetched C# LINQ is three times longer than while select.
No comments:
Post a Comment