On 18/06/2014 21:20, "Ola Fosheim Grøstad" <[email protected]>" wrote:
On Wednesday, 18 June 2014 at 15:42:04 UTC, Etienne wrote:

writeln(obj.member?.nested?.val);


Optional chaining in swift is meant to be used more like this:

if let v = ptr?.attr?.getobj?()?.attr? {
   writeln(v)
} else {
   writeln("oops?!")
}

(I don't think Maybe will look as good.)

Perhaps Maybe could implement opCast!bool, then we could do:

if (auto v = ...)

Reply via email to