[Nickle] nickle: Branch 'master' - 2 commits

Bart Massey bart at cs.pdx.edu
Sun Nov 25 23:23:51 PST 2012


Yeah, I'm now convinced that the boolean was a bad idea.

Should we have optional catch clauses instead? Otherwise, you get

try {
  twixt(f = open(...); close(f)) {
    ...
  }
} catch ... {
}

which is ok, I guess, but a bit awkward...

IDK.

--Bart


On Thu, Nov 22, 2012 at 11:28 PM, Keith Packard <keithp at keithp.com> wrote:

> Bart Massey <bart at cs.pdx.edu> writes:
>
> > Yeah, making the docs match is a good start.
> >
> > I had assumed that the else block would catch the exception raised when
> the
> > opening part of the twixt failed. I'd have to think about how the syntax
> > and semantics for that would look, and whether it would be a good idea.
> >
> > As it stands, though, I think we've gone to a lot of trouble to
> absolutely
> > ensure that the closing part of the twixt is executed even though the
> > opening part has failed, which seems like a recipe for bad trouble in a
> lot
> > of use cases...
>
> If there's an exception in the first part, the second part never gets
> executed. The question is whether to have the first part be a boolean
> that triggers the second part; requiring a boolean is actually pretty
> darn annoying.
>
> --
> keith.packard at intel.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/nickle/attachments/20121125/607beda8/attachment.html>


More information about the Nickle mailing list