Other than in protocols, there is no way to declare a function without implementing its body in Swift, and the only way to do it is via (Objective-)C(++), right?
My (potential) use case for something like this is inserting marker function calls into source code to help with inspecting the IR and/or assembly. Are there better or more established approaches to inserting markers in Swift without using unimplemented functions?
Obviously, one should not use underscored attributes in production. They may change or disappear, or their behaviour may change in any way, at any time.
With that disclaimer out of the way: I use this for exactly the same thing you're looking to do - to define a non-optimisable, easily recognisable stub for inspecting generated assembly. For instance, the Godbolt output for the above shows: