Monday, March 21, 2016

eX PLUS PLUS (X++ for those not into phonetics)

The X++ language click to download the slide deck.
The X++ language VIDEO click to watch Peter in his glory.


Mister Villadsen was at again highlighting the NEW X++ language changes during an informative and fun-filled session, yes fun-filled. Where else are you going to get an X++ genius using arcane terms such as "Cludgy" or "Syntatic Sugar?"

I must start with a digression... Did anyone else think that the dude from the stock image on the opening slide looked like a bizarro Kevin Costner? I could not get it out of my mind at each session.

Anyways, X++! If you build it better they will come! As it was with every other P-Vill sesh, this one was standing room only.

X++ does remain the the vehicle for development in the NEW AX with some changes to promote consistency with other langauges, integration with the CIL and some general house cleaning to sweep away quirks and cludgy elements. The goal is to keep X++ familiar enough as to not scare away legacy developers but evolve it in strategic ways to innovate and attract C# dev folk.

All artifacts are now classes. ALL of them. Every last one. Forms? Yep, Classes? Meta and Yep. Queries and tabular objects? Yep and yep. The designer experience is a little flat, flattened on purpose to be view-able on one page. Not sure that I am going to like this change



  • Can now declare variables anywhere in code
  • Can now use ‘var’ variables as a shortcut
  • Will set data type on assignment
  • Static constructors supported



Muah-ha-ha-ha... MACROS!
Macros are still supported but mainly for legacy purposes and you should refrain from using them. Some reasons why

  • You cannot add documentation comments to macros. 
  • Macros are not cross referenced.
  • Macros do not have well defined scope. 
  • Macros hurt compilation performance.
  • Macros cause less than perfect upgrade tools

In fact Peter said outright that "Macros are evil!"

There is a change in the permissive way in which classes are cast as shown in the example slide below:

Finally, FINALLY is now supported for Try/Catch statements and will run regardless of the outcome of the try

I recommend watching the video presentation for a well-rounded take on X++ in he NEW AX.

No comments:

Post a Comment