I'm not a C++ programmer and haven't kept up with its Templating capability,
which I understand is quite sophisticated.

In Java I think that the closest equivalent is type parameterization. And
that's really not what I'm after because a type-parameterized entity does
not operate on its type parameters. The type parameters just instantiate it
further.

Also in Java one can pass comparison functions (actually objects) to a sort
program. But that is independent of type parameterization.

In Java, I think the first happens at compile time; the second happens at
run time. I'm interested in things where the application of the function to
the arbitrary objects happens at run time -- but not just because the
language is dynamically typed(!).;.

So if these are both aspects of Templating in C++, perhaps Templating is a
bit too general for me.

Sorry to be so picky. I have a pretty clear idea what I'm after and want
something that picks it out as precisely as possible.

-- Russ



On Mon, Sep 7, 2009 at 4:10 PM, russell standish <r.stand...@unsw.edu.au>wrote:

> In C++, such a thing is called a template (which may be an object or a
> function), and the style of programming is called generic programming.
>
> I guess what you're objecing to is that these technical uses of the
> terms do not seem to relate all that well to the usual English
> meanings of the terms.
>
> PS, your example 3 seems to indicate that the standard C library sort
> function is one of these, even thought its just a function. However,
> the standard C++ sort function is actually a template, and far more
> generally useful than the C version, which is also available as a
> particular overload.
>
> On Mon, Sep 07, 2009 at 12:14:31PM -0700, Russ Abbott wrote:
> > This is to the programmers on this list.
> >
> > I'm looking for a word that refers generically to software that is open
> to
> > virtually object in its host language. The best way for me to explain it
> is
> > with examples.
> >
> >    - In Java, the various collection classes each have this property. A
> List
> >    can be a list of anything. (Note that this isn’t about generics such
> as
> >    List<type>. It’s about the fact that the List functionality does not
> limit
> >    the sorts of things one can put into a list. Typed lists are simply a
> way of
> >    ensuring that a program gets its types right. That's a separate
> >    consideration.)
> >
> >
> >    - Other examples include map and reduce in functional programming.
> They
> >    are open if not to anything at least to lists of any sort and to
> functions
> >    or any sort that operate on elements in those lists.
> >
> >
> >    - Another example is a genetic algorithm in that it does not limit the
> >    function that is used as a fitness function or the possible population
> >    elements.  Again, these can be anything.
> >
> > So is there a generic word for software with this sort of "downwardly
> open"
> > property?
> >
> > It may be something like "structural" in that the software defines an
> > operational structure but not the elements that occupy the structure. Is
> > there any commonly used word for this?
> >
> > -- Russ
> >
> > P.S. This demonstrates that one can have an idea before having a word for
> > the idea.
>
> > ============================================================
> > FRIAM Applied Complexity Group listserv
> > Meets Fridays 9a-11:30 at cafe at St. John's College
> > lectures, archives, unsubscribe, maps at http://www.friam.org
>
> --
>
>
> ----------------------------------------------------------------------------
> Prof Russell Standish                  Phone 0425 253119 (mobile)
> Mathematics
> UNSW SYDNEY 2052                         hpco...@hpcoders.com.au
> Australia                                http://www.hpcoders.com.au
>
> ----------------------------------------------------------------------------
>
============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to