In AX 2012 a new type of tables was introduced.
In addition to Regular (permanent) tables and InMemory tables (known as temporary tables in previous versions of AX) we have got TempDB tables - SQL server temporary tables.
I believe thit is the feature that many people expected for a long time. TempDB tables utilize the power of SQL tables - full support of joins, aggregation, indexes, all with great performance, but in the same time they have almost the same scoping mechanism as InMemory temporary tables have.
That simplifies developer's life significantly. There is no more need to be aware of tricks like this or like this.