<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiratara</author_name>
  <author_url>https://blog.hatena.ne.jp/hiratara/</author_url>
  <blog_title>Pixel Pedals of Tomakomai</blog_title>
  <blog_url>https://hiratara.hatenadiary.jp/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>valは定数、varは変数、defはコード、というのが大まかな理解になる。これらは名前空間を共有しているので、定数、変数、コードに同じ名前をつけることはできない。ただし、JSやPythonのように単純にフィールドにメソッドオブジェクトが入っていると思うとハマる部分があるので、その辺を含めて調べたことをメモ。(なお、このエントリは 2.9.1.final での挙動について書いている。) クラス定義のvar、def、val はメソッド valとvarはfinal付き、final無しの変数として解釈されると思われるが、クラスのフィールドとして定義した場合にはJVM上ではメソッド経由でアクセスすること…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F20120202%2F1328155695&quot; title=&quot;Scalaのvalとvarとdef - Pixel Pedals of Tomakomai&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>2012-02-02 13:08:15</published>
  <title>Scalaのvalとvarとdef</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/20120202/1328155695</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
