I think that although the “C” ABI is certainly the most widely used for FFI, forcing it to be explicit would be better than having an implicit default.
I can see that the current policy allows 4 keystrokes (counting the space) to be saved, but to me that looks pretty minor, especially given that an
extern block can contain multiple function declarations.
The advantages I see in always keeping it explicit are:
- it would ensure a more uniform coding style (even in the main rust repo you can find both
extern "C" fn)
- it would make it easier to search for what ABIs are used in a codebase
- it would be more familiar to C++ programmers
I found no previous thread about this, but pointers to dicussions/RFCs/… are welcome.