<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Lebry39</author_name>
  <author_url>https://blog.hatena.ne.jp/Lebry39/</author_url>
  <blog_title>Buri Memo:</blog_title>
  <blog_url>https://burion.net/</blog_url>
  <categories>
    <anon>TypeScript</anon>
    <anon>Programming</anon>
  </categories>
  <description>オブジェクト内で同じ意味を持つ変数が複数存在する場合（つまり、DRY な状態になっていない）、不整合が発生する可能性がある。 例えば、注文を表す Order と、商品を表す Item を考えてみる。Order は複数の Item オブジェクトをまとめる役割である。Item にはそれぞれ商品の名前と価格を持っている。更に、Order クラスには合計金額を持たせたい。この場合、以下のように書けると思う。（アクセス修飾子は適当気味） また、sum(), printOrder() は本質的にはどうでもいい関数なので、これ以降は省略する。 // 合計を計算する（以後省略） function sum(nu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fburion.net%2Fentry%2F2022%2F04%2F25%2F013339&quot; title=&quot;変数の知識の重複による不整合を防ぎたい（DRY原則とオブジェクト指向） - Buri Memo:&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>https://cdn-ak.f.st-hatena.com/images/fotolife/L/Lebry39/20220424/20220424190735.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-04-25 01:33:39</published>
  <title>変数の知識の重複による不整合を防ぎたい（DRY原則とオブジェクト指向）</title>
  <type>rich</type>
  <url>https://burion.net/entry/2022/04/25/013339</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
