Hacker News new | ask | show | jobs
by nextstep 4339 days ago
>> For safety, Swift requires the variables to be initialized before being passed with &. This is because it cannot know whether the method being called tries to read from a pointer before writing to it.

Isn't the 'maybeError' var being used uninitialized in the example right about this passage?

1 comments

It actually does get initialized, albeit intialized to "nil". Someone asked the same question on the devforums. https://devforums.apple.com/thread/238423?tstart=0