Deprecate erlang:exit/2 and erlang:exit/3#10914
Deprecate erlang:exit/2 and erlang:exit/3#10914richcarl wants to merge 3 commits intoerlang:masterfrom
Conversation
CT Test ResultsNo tests were run for this PR. This is either because the build failed, or the PR is based on a branch without GH actions tests configured. Results for commit e28dea9 To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
212b573 to
005b01d
Compare
|
Why? What problem does this solve? |
Apart from the small detail that exit/2 ignores signals sent by a process to itself (probably rare that this happens, but if it does, it could be quite confusing), the main thing is that exit/1 and exit/2 do very different things, one on the exception level and the other on the signal level. When reading code, it's very easy to miss that what you thought was a simple exit/1 was in fact an exit/2 or vice versa - in particular if they occur in the same module. (I've seen cases with exactly one exit/2 among a bunch of exit/1.) So I think there is a point, for maintainability, to have a warning that steers people towards using exit_signal/2 instead. Especially if documentation and training material moves on to using the new name, calls to exit/2 will become even more obscure. |
68a324b to
16ded2d
Compare
16ded2d to
e28dea9
Compare
This is a followup based on #10801 and intended for OTP 30.