<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toyship</author_name>
  <author_url>https://blog.hatena.ne.jp/toyship/</author_url>
  <blog_title>Toyship.org</blog_title>
  <blog_url>https://www.toyship.org/</blog_url>
  <categories>
    <anon>Swift</anon>
  </categories>
  <description>SwiftでOptional値をunwrapするときに一番使う if let 構文。 そのときの変数名の扱いについてみなさんはどうしているでしょうか。 if let Swiftで導入されたOptional、このOptional変数をOptionalではない変数にする unwrap 処理として一般的なのが if let 構文です。 下記のコードでは、aはInt?型なのでIntまたはnilが入っているので、実際にこのなかの値を判定する時には、if let構文でunwrapする必要があります。 let a : Int? // (change a value) if let b = a { print…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.toyship.org%2Farchives%2F2229&quot; title=&quot;if let の変数名 - Toyship.org&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-11-16 16:08:18</published>
  <title>if let の変数名</title>
  <type>rich</type>
  <url>https://www.toyship.org/archives/2229</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
