Call-cc in Go?

276 views
Skip to first unread message

Julian

unread,
Nov 11, 2009, 5:13:39 AM11/11/09
to golang-nuts

Adam Langley

unread,
Nov 11, 2009, 10:43:23 AM11/11/09
to Julian, golang-nuts
On Wed, Nov 11, 2009 at 2:13 AM, Julian <julian...@gmail.com> wrote:
> Is it possible to use a call-cc in Go?
>
> http://en.wikipedia.org/wiki/Call-with-current-continuation

No. It's not completely possible to imagine since the stacks are heap
allocated, but I don't believe that we have plans for continuations at
the moment.


AGL

John Cowan

unread,
Nov 11, 2009, 4:32:17 PM11/11/09
to Adam Langley, Julian, golang-nuts

Goroutines are equivalent to one-shot (use and forget) continuations anyhow.

>
>
> AGL
>

--
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures

roger peppe

unread,
Nov 12, 2009, 11:09:06 AM11/12/09
to John Cowan, Adam Langley, Julian, golang-nuts
2009/11/11 John Cowan <johnw...@gmail.com>:
> Goroutines are equivalent to one-shot (use and forget) continuations anyhow.

but they're not garbage collected in the same way, right?

Ian Lance Taylor

unread,
Nov 12, 2009, 6:22:54 PM11/12/09
to roger peppe, John Cowan, Adam Langley, Julian, golang-nuts
Currently they are not, correct. The plan is that eventually they
will be.

Ian
Reply all
Reply to author
Forward
0 new messages