<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>48751</integer>
    </number>
    <user>
      <string>|Agent</string>
    </user>
    <title>
      <string>class and namespace modules idea</string>
    </title>
    <contents>
      <string>namespace alpha {

class X {
  int i;
  void print();
  void print(int a);
}

class Y {
  void print();
}
}

namespace beta {

class X {
  void print();
}
}

---------------

define module alpha
  use alpha::X, prefix: &quot;X::&quot;, export &lt;X&gt;
  use alpha::Y, prefix: &quot;Y::&quot;, export &lt;Y&gt;
  export print; // The keyword-only generic, dispatches to X or Y
  export i, i-setter; // Only dispatches to X
end

define module beta
  use beta::X, prefix: &quot;X::&quot;, export &lt;X&gt;
  export print; // Dispatches to X
end

define module alpha::X
  export &lt;X&gt;, i, i-setter, print
end

define module alpha::Y
  export &lt;Y&gt;, print
end

define module beta::X
  export &lt;X&gt;, print
end

</string>
    </contents>
    <universal-time>
      <integer>3400689603</integer>
    </universal-time>
    <channel>
      <string>#dylan</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </paste>
  <annotation>
    <number>
      <integer>2</integer>
    </number>
    <user>
      <string>|Agent</string>
    </user>
    <title>
      <string>Add'l note</string>
    </title>
    <contents>
      <string>In the alpha module, i and i-setter would be aliased to X::i and X::i-setter, but print would have a method in the alpha module itself to dispatch to X::print or Y::print.</string>
    </contents>
    <universal-time>
      <integer>3400690635</integer>
    </universal-time>
    <channel>
      <string>#dylan</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </annotation>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>|Agent</string>
    </user>
    <title>
      <string>usage example</string>
    </title>
    <contents>
      <string>If you are only using namespace alpha, then you can just use class &lt;X&gt;, but if you use both, you'll have to prefix and say alpha::&lt;X&gt; or beta::&lt;X&gt;.

If you are only using beta::X, then you can use print() without a disambig. prefix.</string>
    </contents>
    <universal-time>
      <integer>3400689898</integer>
    </universal-time>
    <channel>
      <string>#dylan</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </annotation>
</paste-with-annotations>