<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takeshinoda</author_name>
  <author_url>https://blog.hatena.ne.jp/takeshinoda/</author_url>
  <blog_title>word-iteration</blog_title>
  <blog_url>https://takeshinoda.hatenadiary.org/</blog_url>
  <categories>
    <anon>programming</anon>
  </categories>
  <description>Swift の Array の append の振る舞いが直感に反する的な意味で話題になってて、自分も面白かったので、調べたメモ。一応注意：調べ方が雑なのでウソ書いてるかもしれないので注意してください。話題のSwiftコード var a = [1, 2, 3] var b = a println(a) // [1, 2, 3] println(b) // [1, 2, 3] a.append(4) println(a) // [1, 2, 3, 4] println(b) // [1, 2, 3] &lt;= b はいったい何を見ているんだ…？ Rubyならこうなる。大体のOOPLならこうなると思う…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakeshinoda.hatenadiary.org%2Fentry%2F20140611%2F1402508315&quot; title=&quot;Swift の配列で append すると変数が参照する値まで変わる話のしょぼいメモ - word-iteration&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>2014-06-11 02:38:35</published>
  <title>Swift の配列で append すると変数が参照する値まで変わる話のしょぼいメモ</title>
  <type>rich</type>
  <url>https://takeshinoda.hatenadiary.org/entry/20140611/1402508315</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
