[Swift-devel] Re: How to wait on functions that return no data?
Ben Clifford
benc at hawaga.org.uk
Tue Mar 25 18:18:06 CDT 2008
On Tue, 25 Mar 2008, Mihael Hategan wrote:
> > where each element is of type 'maybe resultfile' and so can (independent
> > of the other elements) be a file or null.
>
> pretty much like try {a[x] = f(x)} catch {} or maybe(a[x] = f(x)).
in the array case, sort of, yes.
Doesn't compare so well when passing round a single non-array value though
- a = Nothing is different from a not being assigned (yet, or never),
which is what syntax this like: try { a =f(x) } catch {} alludes to.
The try/catch syntax also alludes to a null response being somehow
exceptional, rather than a legitimate return value.
--
More information about the Swift-devel
mailing list