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

* [ruby-core:121793] [Ruby Misc#21299] Proposal: Remove `continuation` gem
  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 ` ianks (Ian Ker-Seymer) via ruby-core
  2025-05-01 17:54 ` [ruby-core:121794] " mame (Yusuke Endoh) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: ianks (Ian Ker-Seymer) via ruby-core @ 2025-05-01 17:28 UTC (permalink / raw)
  To: ruby-core; +Cc: ianks (Ian Ker-Seymer)

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/

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

* [ruby-core:121794] [Ruby Misc#21299] Proposal: Remove `continuation` gem
  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 ` mame (Yusuke Endoh) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2025-05-01 17:54 UTC (permalink / raw)
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #21299 has been updated by mame (Yusuke Endoh).

Status changed from Open to Closed

Please don't take callcc away from Ruby.

I would like to express my strong and careful opposition to the proposal to remove `Kernel#callcc` from Ruby. The proposal may seem minor to some, but to me, it would take away something quietly powerful and meaningful.

Here's why I believe `callcc` should stay.

## 1. `callcc` is an example of the soul of Ruby's expressive freedom

Ruby is not just a practical language; it's a language of joy, curiosity, and freedom. While I agree that `callcc` should not be used in most production code today, it is a rare and beautiful tool that shows what Ruby can do when it stretches.

Ruby has always prided itself on expressive freedom and linguistic diversity. I believe `callcc` is a small but symbolic part of that spirit.

## 2. Educational and research value

Continuations are one of the essential topics in programming language theory. They are very much alive in textbooks, lectures, university courses, and online materials that explore language design and control flow.

Many textbooks, lecture slides, blogs, and academic papers contain Ruby sample code using `callcc`. If this feature is removed, these resources will no longer work as-is, resulting in a subtle but real loss of educational compatibility. This could undermine Ruby's usefulness in academic and exploratory learning contexts.

That's not just a technical loss. It's a cultural one.

## 3. A foundation for experimentation and extension

Though rare in practical use, low-level features like `callcc` serve another important role: they enable experimentation.

>From custom control structures and coroutine implementations to experimental asynchronous models, `callcc` has historically been used as a flexible foundation for building and exploring such constructs. Even if not widely used, its presence preserves the possibility of exploration, which is very much in line with Ruby's identity as a fun and expressive language.

Languages grow not only by trimming, but also by leaving space for the unexpected.

## 4. Once it's gone, we may not get it back

Removing features isn't just subtraction -- it's amputation. Even a niche, lightly-used feature like `callcc` is part of Ruby's story. Once it's removed, bringing it back would be difficult, and the community knowledge around it would fade.

While simplification and maintenance are important, we must not ignore the invisible value of historical, philosophical, and educational richness that would be lost along the way.

We should always ask: Is the gain really worth what we lose? In this case, I believe the answer is no.


## Conclusion

`callcc` is not primarily for production code. It exists for education, research, experimentation, and the spirit of expressive programming. Retaining it means preserving an important facet of Ruby's personality.

That is why I say a wholehearted **NO** to its removal.

---

*Note: This proposal is a duplicate of [Feature #10548](https://bugs.ruby-lang.org/issues/10548), where a discussion has already taken place. So I close this ticket as a duplicate.

----------------------------------------
Misc #21299: Proposal: Remove `continuation` gem
https://bugs.ruby-lang.org/issues/21299#change-112859

* Author: ianks (Ian Ker-Seymer)
* Status: Closed
----------------------------------------
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).