[Swift-devel] [Bug 291] New: Add a exists() function to test for file existence

Tim Armstrong tim.g.armstrong at gmail.com
Fri Apr 1 10:22:55 CDT 2011


Try/catch statements don't have a clean intepretation if you're trying to
follow the flow of data through the program.

On Fri, Apr 1, 2011 at 5:35 AM, Allan Espinosa <aespinosa at cs.uchicago.edu>wrote:

> Would it be better to handle it as an exception?
>
> type file;
>
> app foo (file x) {
>    foo x;
> }
>
> app (file x)  produce_a () {
> }
>
> file a <"dne">;
>
> try{
>  foo (a);
> }
> catch (dne) {
>    a = produce_a();
>    foo(a);
> }
>
> 2011/3/31  <bugzilla-daemon at mcs.anl.gov>:
> > https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=291
> >
> >           Summary: Add a exists() function to test for file existence
> >           Product: Swift
> >           Version: 0.93
> >          Platform: PC
> >        OS/Version: Mac OS
> >            Status: NEW
> >          Severity: enhancement
> >          Priority: P1
> >         Component: SwiftScript language
> >        AssignedTo: wozniak at mcs.anl.gov
> >        ReportedBy: wilde at mcs.anl.gov
> >
> >
> > Requested by John Dennis / NCAR.
> >
> > --
> > Configure bugmail:
> https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
> > ------- You are receiving this mail because: -------
> > You are watching the reporter.
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> >
> >
>
>
>
> --
> Allan M. Espinosa <http://amespinosa.wordpress.com>
> PhD student, Computer Science
> University of Chicago <http://people.cs.uchicago.edu/~aespinosa>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20110401/254ed9e5/attachment.html>


More information about the Swift-devel mailing list