[e-lang] Variations on When-Catch

marcs marcs at skyhunter.com
Tue Dec 21 14:08:20 EST 2004


> > One might think of it like this:
> > 
> > when (milesTraveled() // ksPerMile) -> done(ksTraveled) {
> >                                            # do something 
> with ksTraveled
> >                                        } catch problem {
> >                                            # handle problem
> >                                        } finally {
> >                                            # do regardless
> >                                        }
> 
> I like that! Although it wastes too much horizontal space to 
> ask people to 
> actually write it this way, I think it's a great way to explain it.
> 
> MarcS, what do you think of using this layout when you first 
> explain the 
> when-catch in Walnut?

Well, I think I may use this layout when I first introduce the finally
clause. It is certainly true that I have to do something to make the point
about the limitations of the finally clause.

--marcs




More information about the e-lang mailing list