Sorry to jump in here, and maybe I’m missing something obvious, but in your
example Rick is two levels of closure deep and only has access to one of the
arrays in his struct. In this case there is another array of floats he needs as
an argument to his method call. Will he need to go through the
Was it ever explained why the syntax is different?
--
Chris McIntyre
> On Jul 18, 2017, at 6:46 PM, Jens Persson via swift-users
> wrote:
>
> That is not true. Structs can have delegating initializers but they cannot be
> marked with `convenience` (only the
I don’t think there’s any symmetry break. I would argue that forced-unwrapping
is rarely a best-practice. The swifty way would be to always use guard let and
if let for optionals. Looking through the Swift Programming Language book, the
only examples of “if x != nil” I can find just print some
That makes sense. I think I've gotten so used to the type system magically
figuring out what I want, combined with the error message pointing to the
return type that this just went right over my head.
--
Chris McIntyre
> On Sep 4, 2016, at 3:59 PM, Ole Begemann via swift-users
>
Hi guys,
I’m either missing a subtlety in regards to closures or I found a bug with the
type inference system in Xcode 8 Beta 6. Thought I’d run it by you.
I’m trying to use Data’s method withUnsafeBytes(_:). It’s declared as:
func withUnsafeBytes(_ body: