This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> > The one thing that most gets to me when writing scheme code is that > > C allows you to return from a function from anywhere you like and scheme > > requires that you structure it with (cond) and such. I find commands > > like `break', `continue' and `return' incredibly useful (is this just > > me?) > > R4RS Scheme has call-with-current-continuation, which is much more flexible > than the jump instructions of imperative languages, at least is capable to > emulate them. It just so happens that I was reading R4RS just earlier today and thinking that call-with-current-continuation looks pretty cool. Then I looked at the libguile and found that call-with-current-continuation is not supported <sob>. Actually, call-with-current-continuation is supposed to replace catch and IMHO it is more useful than catch and it avoids the spewey dynamic-wind list of tags and other such things that are entrenched in guile at this moment. I also had a thought about errors... is it currently possible to override the `error' procedure with your own error procedure and use this to redirect all of the system errors? Is is safe to redefine `error' for some bits of code and put back the global value for other sections? If the error handling used call-with-current-continuation, could `error' be made into a handy exit procedure that dropped back to whatever error handling was activated at the time? Maybe this would offer application developers an easy mechanism to customise guile error handling. - Tel