Thank you. That makes a lot of sense. Wasn't sure what you meant by
marking, but now I am clear.
I definitely felt awkward in my use of inheritance in this situation,
and normally for reflectively loaded code, I use attributes. In this
case, my desire was to enforce a contract on the constructor more than
marking for loading. I didn't feel I fully violated the Liskov
principle, but I also didn't think in terms of whether there is a test
for it. I knew this wasn't ideal, but I am not aware of any other way
to enforce a contract on the constructor. I'm also not sure how
valuable this is.
On Oct 21, 2:07 pm, Graham Nash <
graham.m.n...@gmail.com> wrote:
> If the Strategy child classes have no public methods, then there is no
> reason for them to be Strategies as they are not extending the behavior of
> the base class and therefore there is no test for the Liskov Substitution
> Principle.
>
> It appears, as I referenced previously, inheritance is being used for
> marking (so they can be found via reflection). Attributes would be more
> appropriate.
>
> On Thu, Oct 21, 2010 at 1:56 PM, Chrisa23 <
chris...@gmail.com> wrote:
> > I am actually only referencing strategies as the base Strategy class
> > in my code. I have some factory methods that take a strategy
> > definition, instantiate it through reflection and return it as
> > Strategy. My system only knows about the base class Strategy and
> > never the details of whichever real strategy object is instantiated.
> > While the Strategy classes do not have public methods, they do have
> > control channels to allow interaction.
>
> > I think that is kind of what you are referring to. Does that seem to
> > make more sense given that explanation?
>
> > On Oct 21, 10:08 am, Graham Nash <
graham.m.n...@gmail.com> wrote:
> > > It looks like pretty standard usage.
>
> > > However, independent of the usage of Retlang, I wouldn't use inheritance
> > in
> > > this case as it appears the child class would never be used via a parent
> > > reference. It appears it is just being used as a marker for which
> > > inheritance is a bit heavy.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "retlang-dev" group.
> > To post to this group, send email to
retla...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
retlang-dev...@googlegroups.com<
retlang-dev%2Bunsu...@googlegroups.com>
> > .