<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xml.xsl" type="text/xsl"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>nulog, NULL::something : out of the headphone &gt; 2004 &gt; September &gt; 05 &gt; Ruby PluginManager と命名規則</title>
  <link href="http://lowreal.net/logs/2004/09/05/5"/>
  <icon>http://lowreal.net/img/banner.png</icon>
  <link rel="self" type="application/atom+xml" href="http://lowreal.net/logs/2004/09/05/5.atom"/>
  <link rel="alternate" type="application/xhtml+xml" href="http://lowreal.net/logs/2004/09/05/5.xhtml"/>
  <updated>2004-09-05T19:00:26+09:00</updated>
  <author>
    <name>cho45(砂糖)</name>
  </author>
  <id>http://lowreal.net/2004/09/05/5</id>
  <entry>
    <title>Ruby PluginManager と命名規則</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2004/09/05/5.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2004/09/05/5.xhtml"/>
    <updated>2004-09-05T19:00:26+09:00</updated>
    <published>2004-09-05T19:00:26+09:00</published>
    <id>http://lowreal.net/2004/09/05/5</id>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>外側からアクセスできるのはそんな大きな問題にはならないような気がするので、このまま実装してこう。まぁクラスオブジェクトを適当に突っ込んだらすぐに <code class="Ruby">remove_const</code> すればいいような気がしないでもない。この辺考えよう……</p>
        <p>前回ロード時のファイル日時と比べて更新されてたらリロードするメソッドとかとか。</p>
        <p>ちなみに結構命名規則がいいかげんな感じで統一してたりする。クラス名とかモジュール名は単語先頭を大文字にする（どっちにしろクラス名先頭は大文字だし）形で、メソッド名とか変数名はアンダースコアで単語つなぐ、ってのを基本として適当に単語作ったり略したり。</p>
        <dl title="俺感性の命名">
          <dt>foo_bar</dt>
          <dd>普通</dd>
          <dt>FooBar</dt>
          <dd>WinAPI とか、C とかっぽい気がする。読み難いし書きづらいし間違いやすい。</dd>
          <dt>FOO_BAR</dt>
          <dd>定数</dd>
          <dt>fooBar</dt>
          <dd>なんかダサい</dd>
          <dt>Foo_Bar</dt>
          <dt>Foo_bar</dt>
          <dd>あんまり見かけない</dd>
          <dd>激しくダサい</dd>
        </dl>
        <p>どうでもいい話だ。でも Ruby のメソッド名に大文字が混ざってると違和感！　Javascript だといろいろ混ざったりとか……キタネ</p>
        <ins datetime="2004-09-05T19:22:13+09:00">
          <p>ていうか、インスタンス作ったらすぐに remove_const やってもいいのかな。</p>
        </ins>
      </div>
    </content>
  </entry>
</feed>
