3 ms·
Sadly I think Rust's way is the best one in the long term even if it's not very user friendly. There are a lot of problems with the FreeBASIC syntax, my comment
by livre 6y ago
Sadly I think Rust's way is the best one in the long term even if it's not very user friendly. There are a lot of problems with the FreeBASIC syntax, my comment was mostly wishful thinking. As other user has said in a reply to my comment, you can't beat the level of control Rust's syntax provides and that's what most people writing assembly would want. You are also right that a proper asm parser would be difficult to maintain due to the amount of architectures Rust has to support.
- fluffything 6y agoNotice that you can quite easily implement a Rust proc macro that takes whatever DSL you want to use for inline assembly, and generates an `asm!` expression from it. So better syntaxes are possible, as long as they can be built on top of the proposed inline-assembly feature. They can, however, just be implemented as normal Rust libraries, and do not need to be part of the compiler.
- dathinab 6y agoYes, I mean we shouldn't forget that asm today is a last resort escape hatch which should be avoided if possible. EDIT: Just to be clear it's still important. But it's mainly used for a view "very high control" use cases.