Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Continuations are absolutely possible. This is absurd that your professor isn't staying up to date. Especially considering he's teaching a PL class. See Section 4.2 for academic "proof" http://www.ccs.neu.edu/scheme/pubs/icfp05-pcmkf.pdf

When .NET clr and C# beta first came out, closures were said to be impossible! C# 2.0 supports lexical closures and CPS (continuation passing style). So no call/cc but most everything else. Most developers don't even know the difference between closures and continuations to begin with. So I understand the compiler team's reasons for not implementing continuations yet. But back in 2001 - 2002 closures were said to be impossible too.

Mono has implemented continuations already... (of course) http://lists.ximian.com/pipermail/mono-devel-list/2006-April...

.NET clr does not explicitly support them. Neither does the jvm. The jvm is planning on explicitly adding support http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6655643

There are plenty of things missing in the jvm (by design). That the clr has and some of those have ended up being useful. I don't know how many developers remember but the clr really pushed changes to the jvm. But that is for a different thread.

Microsoft will support continuations and other advanced features as more developers begin to use those coding styles. The more .NET scheme, python, ruby developers the better. Or maybe the pressure will come from the web development side where continuations are promising (weblocks, arc, seaside).

[EDIT: A few sentences and fixing grammar]



>This is absurd that your professor isn't staying up to date. Especially considering he's teaching a PL class

The afformentioned professor Abelson is one of the authors of the Wizard Book. A look at the above citation reveals that he made the statement in 2003, while the paper your reference was published in 2005.


Ya I've read it along with most anyone that has had an interest in programming languages and went to school in the last 20 years. It doesn't make his statement less absurd.

I was doing undergraduate research on .NET in 2003 and it was absurd when I first heard it. Academics were upset that M$ made a pragmatic IL. One that didn't support many advanced languages features. That didn't mean implementing those features wasn't possible. It just meant it was yet another step back for features making it to the M$ environment.

It should be noted that Parrot was getting a lot of talk back then. It would be THE intermediate language for all languages dynamic or functional... Maybe it makes sense to start pragmatic, like the jvm and .NET, and then add the harder part later.


I think continuation-based web frameworks are a bad use case. It's a leaky abstraction in the same way as wiewstate in ASP.NET: It tricks you into believing that you can write a web app like a traditional stateful application. But all kinds of subtle problems with caching, bookmarks, the back button, search engines and so on crops up.

But continuations are really cool for implementing language features like backtracking.


Viewstate may be bad but it works and .NET developers have figured out how to use it safely and efficiently (ok some .NET developers have).

As for continuation-base web frameworks being a bad use case. I think they are a bad use case in some ways. You make good points. I think the concept is very new. This site is implemented with continuations and it works pretty well. So it's possible to have a successful site. And the current iterations have their problems, no doubt. But that doesn't mean the concept and idea is dead. It's an elegant solution from a coding standpoint - when it works. My point was that continuations could have other uses than the traditional list (backtracking,coroutines,multitasking,escape/enter recursion, etc). And if they do, then M$ is more likely to add them. M$ is not going to add continuations so that a small percentage of their developers will have an easier time implementing backtracking. But, they may very well add continuations if their web developers want them. Or if a large number of people are using IronPython or IronRuby.


> This site is implemented with continuations and it works pretty well.

I believe it uses persistent closures, not persistent continuations. And anyway, it often fails with the message "Unknown or expired link." (because you cant keep all the closures alive indefinitely - but you have to, otherwise you break the web!) This wouldn't be acceptable for most sites.

In any case, I don't think MS would add continuations to .net specifically to support continuation based web frameworks. The model with persistent continuations (or persistent closures for that matter) is at odds with the threading model in IIS, where the server is supposed to spawn multiple threads running the same application code. And IIS is strategic to MS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: