From: "ianks (Ian Ker-Seymer) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "ianks (Ian Ker-Seymer)" <noreply@ruby-lang.org>
Subject: [ruby-core:121792] [Ruby Misc#21299] Proposal: Remove Continuation Feature from Ruby Core
Date: Thu, 01 May 2025 17:27:18 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-21299.20250501172717.17145@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-21299.20250501172717.17145@ruby-lang.org>
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/
next parent reply other threads:[~2025-05-01 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 17:27 ianks (Ian Ker-Seymer) via ruby-core [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-21299.20250501172717.17145@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).