You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Macros are extremely powerful, but can introduce unnecessary complications, when not done right.
Currently, the only way to have this level of functionality is to do messy post-compile IL rewrites, and/or Debug conditionals to a certain extent, for conditional codes.
Addition of macros in the way its expressed in Rust-Lang where the evaluations happen during compile time, and produce code could be extremely powerful, and could be realized neatly with Roslyn. Rust-Lang expresses them very succinctly as a part of the language itself (almost in-differentiable from calling methods)
This could potentially replace all mixin tweaks currently used, but without any of the run time-performance hit.
I haven't thought much on the implementation, but if this seems to be an area of interest for the core team, implementation discussions here could be started off here. Meanwhile, in comparison with Rust itself which provides a clean implementation that works with pattern matching at its crux, the key detail would be in how the handoff to Roslyn happens, and how the resulting tree is created by Roslyn with type-safety.
The text was updated successfully, but these errors were encountered:
@AdamSpeight2008 Was a bit disappointed when my search for macros in GitHub issues yielded none. Function templates seem appropriate! Nice, shall give it a thorough read soon.
Macros are extremely powerful, but can introduce unnecessary complications, when not done right.
Currently, the only way to have this level of functionality is to do messy post-compile IL rewrites, and/or Debug conditionals to a certain extent, for conditional codes.
Addition of macros in the way its expressed in Rust-Lang where the evaluations happen during compile time, and produce code could be extremely powerful, and could be realized neatly with Roslyn. Rust-Lang expresses them very succinctly as a part of the language itself (almost in-differentiable from calling methods)
This could potentially replace all mixin tweaks currently used, but without any of the run time-performance hit.
I haven't thought much on the implementation, but if this seems to be an area of interest for the core team, implementation discussions here could be started off here. Meanwhile, in comparison with Rust itself which provides a clean implementation that works with pattern matching at its crux, the key detail would be in how the handoff to Roslyn happens, and how the resulting tree is created by Roslyn with type-safety.
The text was updated successfully, but these errors were encountered: