On Mon, Mar 17, 2008 at 9:14 AM, Robert Klemme
<shortcutter / googlemail.com> wrote:
> On 17.03.2008 00:12, Sean O'Halpin wrote:
>  > On Sun, Mar 16, 2008 at 9:30 PM, Robert Klemme
>  > <shortcutter / googlemail.com> wrote:
>  >>  Yeah, but you can achieve the functionality without modules at all - at
>  >>  the small cost of defining a single instance method in class Module.
>  >
>  > I suspect that Trans is looking for a general principle to follow and
>  > is using equality as an example (but I'm open to be corrected of
>  > course :)
>
>  Maybe.  IIRC he did not state this.

Indeed. Perhaps Trans can enlighten us as to the real application?
(Are you listening Tom?)

>  > While adding a single method to Module may seem like a small cost if
>  > you're only using it in a single program,
>  > it becomes unsustainable when you're managing a large public library
>  > like Facets which is trying to play nice with frameworks like Rails
>  > (which doesn't go out of its way to be polite).
>
>  Agreed.  But that's a different story - I reacted to a very concrete
>  question.  Maybe it was my fault to not read it as a more general
>  question - OTOH the original question was rather short and you can read
>  it both ways IMHO.

True enough. As I said, I'm only surmising what Trans is after. I'm
not criticising your response to the concrete example (after all,
it is both pragmatic and to the point). Rather, I'm taking the
question Trans posed as an opportunity to discuss what I consider best
practice in the more general case.

>  > Also, Ara's point about unintended constant propagation is a very good
>  > one. I recently got stung by an otherwise innocent VERSION constant
>  > which screwed up all manner of unrelated things.
>
>  Yeah, but happens only if you include modules.  My point here was that
>  the same behavior can be achieved by a single method in class Module.
>  And in this particular case (defining equivalence) it is so general that
>  it should even be part of the std lib.

Agreed. (Lots of other things I'd like to see there too, and some I'd
rather see not there - but that's a different story :)

> No module inclusion, no constant
>  propagation.

True.

>  > So my tuppence worth goes towards something like Ara's version of the
>  > module inclusion method.
>
>  "tuppence"  LOL - was this a typo or is it a common idiom I haven't seen
>  before?  (Sounds a bit like these plastic boxes...)

Just showing my age & nationality (old, British :) Tuppence = 2 pence,
3 pence was 'thruppence', the coin 'a thruppenny bit' and we used to
call the six pence coin 'a tanner'.)

>  Kind regards
>
>         robert
>
All the best,
Sean