From: "ianks (Ian Ker-Seymer) via ruby-core" Date: 2025-05-01T17:28:19+00:00 Subject: [ruby-core:121793] [Ruby Misc#21299] Proposal: Remove `continuation` gem Issue #21299 has been updated by ianks (Ian Ker-Seymer). Assignee deleted (ioquatix (Samuel Williams)) ---------------------------------------- Misc #21299: Proposal: Remove `continuation` gem https://bugs.ruby-lang.org/issues/21299#change-112856 * Author: ianks (Ian Ker-Seymer) * Status: Open ---------------------------------------- Continuations have been obsolete since Ruby 2.2 but still add complexity to the core codebase. I propose removing all continuation support from Ruby Core. ### Reasons #### Simplifies fiber code - Current fiber code in `cont.c` is complicated by shared logic with continuations - Removing continuations will simplify stack management, context switching, and reduce edge cases - Ultimately leading to: cleaner code, easier maintenance, possible performance improvements #### Low compatibility risk - Major libraries (e.g., [Metasploit](https://github.com/rapid7/metasploit-framework/pull/2413)) stopped using continuation years ago - Projects needing this functionality have found workarounds (e.g., hyperion_http simulates `callcc`) - [TruffleRuby does not support continuations](https://github.com/oracle/truffleruby/blob/ac88a0fe68bf957f75af7d316594b89731fdec4e/lib/truffle/continuation.rb#L23), yet maintains high compatibility ### Proposed steps 1. Remove the continuation gem from default gems. 2. Delete all continuation-specific code in `cont.c`. 3. Add a stub gem that raises an exception if continuations are used. 4. Optionally document alternative approaches for users who still need this feature. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/