Re:Was Rust Worth It?
by oconnor663 on Wednesday October 25, 2023 @09:38PM
(#38020688)
I should've said "stabilized" instead of "standardized" to avoid stepping on this conversational landmine. But an important practical difference is that Rust supports inline assembly on Windows. (Correct me if I'm wrong, but I think MSVC mostly does not support inline asm.)
[ Parent
| on HN ]
It does support inline assembly [1]. However, it's different than the way GCC supports inline assembly. It seems nicer, TBH.
[1]: https://learn.microsoft.com/en-us/cpp/assembler/inline/inlin...
Re:Was Rust Worth It?
by oconnor663 on Wednesday October 25, 2023 @10:21PM
(#38020942)
From that source:
> Inline assembly is not supported on the ARM and x64 processors.
Oh, my bad. I should have read the source more closely. I hadn't realized only 32-bit x86 processors were supported.
That's hilarious. Like, the compiler team had ONE GUY that believed in and developed this feature and retired in 1999.
I can't remember where I heard this, so take it with a grain of salt.
IIRC, the MSVC C/C++ compilers don't output assembly and then assemble that with an assembler; they output machine code directly for efficiency. It could be that inline assembly would require an assembly language parser that would have to be merged into the compiler and complicate the architecture, and they have no reason to do that unless enough paying customers request it.