ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:121792] [Ruby Misc#21299] Proposal: Remove Continuation Feature from Ruby Core
@ 2025-05-01 17:27 ianks (Ian Ker-Seymer) via ruby-core
  2025-05-01 17:28 ` [ruby-core:121793] [Ruby Misc#21299] Proposal: Remove `continuation` gem ianks (Ian Ker-Seymer) via ruby-core
  2025-05-01 17:54 ` [ruby-core:121794] " mame (Yusuke Endoh) via ruby-core
  0 siblings, 2 replies; 3+ messages in thread
From: ianks (Ian Ker-Seymer) via ruby-core @ 2025-05-01 17:27 UTC (permalink / raw)
  To: ruby-core; +Cc: ianks (Ian Ker-Seymer)

Issue #21299 has been reported by ianks (Ian Ker-Seymer).

----------------------------------------
Misc #21299: Proposal: Remove Continuation Feature from Ruby Core
https://bugs.ruby-lang.org/issues/21299

* Author: ianks (Ian Ker-Seymer)
* Status: Open
* Assignee: ioquatix (Samuel Williams)
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-01 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-01 17:27 [ruby-core:121792] [Ruby Misc#21299] Proposal: Remove Continuation Feature from Ruby Core ianks (Ian Ker-Seymer) via ruby-core
2025-05-01 17:28 ` [ruby-core:121793] [Ruby Misc#21299] Proposal: Remove `continuation` gem ianks (Ian Ker-Seymer) via ruby-core
2025-05-01 17:54 ` [ruby-core:121794] " mame (Yusuke Endoh) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).