2 ms·
>the statics level is where all linguistic machinery is being performed at compile-time. Similarly, the dynamics level is where code is being executed at run-ti
by Vt71fcAqt7 3y ago
>the statics level is where all linguistic machinery is being performed at compile-time. Similarly, the dynamics level is where code is being executed at run-time. Thence the typical control flow operators, such as if/while/for/return, data structures, and procedures, are dynamic
int x = getFizBuz(1) is static, (or should be, in a smart enough compiler) despite `getFizBuz` having if/else in it's definition (if (x % 3 == 0)).
This can happen in the real world. For example `button(size: 10)` could have some size dependent logic in its constructor that could be inlined. Any function that is called with static arguments could be inlined and run control flow at compile time.