<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rimever</author_name>
  <author_url>https://blog.hatena.ne.jp/rimever/</author_url>
  <blog_title>より良いエンジニアを目指して</blog_title>
  <blog_url>https://rimever.hatenablog.com/</blog_url>
  <categories>
    <anon>Swift</anon>
  </categories>
  <description>Swiftのソースレビューをしていたら、switchはふーん、そうなんだーと思いました。 以下のように書きます。 import Foundation let num = 1 var text = &quot;&quot; switch num { case 1: text = &quot;one&quot; default: text = &quot;other&quot; } print(text) breakは宣言しなくても次のcase,defaultの前で処理が終わります。 続行したいならfallthoughを宣言しますが、これは基本的には使うなという意味でしょう。 switch文の問題は、このbreakしないと処理が落ちてしまうと言われる点です…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frimever.hatenablog.com%2Fentry%2F2021%2F06%2F27%2F000000&quot; title=&quot;Swiftのswitch文 - より良いエンジニアを目指して&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>2021-06-27 00:00:00</published>
  <title>Swiftのswitch文</title>
  <type>rich</type>
  <url>https://rimever.hatenablog.com/entry/2021/06/27/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
