Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Jeremy Bowers
On Wed, 05 Jan 2005 12:15:29 +0300, Roman Suzi wrote:
> As for concepts, they are from Generic Programming  (by Musser and
> Stepanov) and I feel that Python is in position to implement them to the
> fullest extent. And IMHO it will be nicer than just Java-like interfaces
> or Eiffel's contract approach.
> 
> I can try to write a PEP "Generic Programming Concepts".

I'd like to see this.

As corey says, sooner rather than later is good. Release Early, Release
Often :-)

I'm still skeptical on how *most* Generic Programming concepts are an
improvement, but while I don't know much about how "concepts" formally
work I know I like the name... and that's a start. I'd love to see my
skepticism proved wrong.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread corey

Roman Suzi wrote:
> On Wed, 5 Jan 2005, EP wrote:
>

>
> I can try to write a PEP "Generic Programming Concepts".
>

That would be great.  It's so hard to get your head around an abstract
concept (a thought, not a programming concept) without a concrete
example in some form of syntax.  I think that's what's throwing off
most people from the idea.
And if you really do want to get it incorporated into whatever Guido is
thinking, it would probably be best to hurry.  ;)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Roman Suzi
On Wed, 5 Jan 2005, Paul Rubin wrote:

>Paul Rubin  writes:
>> There is nothing in Wikipedia about [Generic programming].
>
>Oops: http://en.wikipedia.org/wiki/Generic_programming
>
>This helps.  But I don't see how it's different from what used to
>be called polymorphism.

I already posted these links. They seem to give more fundamental
definitions than wikipedia:

'''
 1. http://www.cs.rpi.edu/~musser/gp/

 2. "A Formalization of Concepts for Generic Programming"
(google could find PDF of that). If I am correct, this one:
http://www.osl.iu.edu/publications/pubs/2004/willcock04:_formal_concep_gener_progr.pdf

(it is safe to skip till example on Fig.1 to grasp the idea behind
a concept. Relations between concepts are also very logical and
remind of inheritance, association and aggregation)

 3. "The Boost Graph Library" by Jeremy Siek, et al with A.Stepanov's
foreword is a good way to see GP != STL.
'''

As for polymorphism, yes, polymorphism. But any decent language has some sort
of polymorphism today. The essense of concepts is that they provide
formalities for (call them) contracts, interfaces, etc. Concepts from GP
gather all these together and call it a concept: a family of similar types.

Python already uses concepts implicitly, by convention. And we know them well:
file-like objects, sequences, maps, sets, queues, arrays, etc.
My "marketing" of GP is directed to formalise on concepts instead of
partial cases (design-by-contract, interfaces etc).

Thus, concepts control polymorphism not only from liberation side, but
from constraint side too. Right now concepts in Python are reused
here and there without explicit mentioning. Concepts could help
make code even more reusable.


Sincerely yours, Roman Suzi
-- 
[EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Skip Montanaro
Paul> Oops: http://en.wikipedia.org/wiki/Generic_programming

Paul> This helps.  But I don't see how it's different from what used to
Paul> be called polymorphism.

I think of generic programming as polymorphism for statically typed
languages.  Using the example from the Wikipedia reference, you can't have a
generic List class that can hold a list of ints as well as a list of animals
without using templates.

Skip

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Paul Rubin  writes:
> There is nothing in Wikipedia about [Generic programming].

Oops: http://en.wikipedia.org/wiki/Generic_programming

This helps.  But I don't see how it's different from what used to
be called polymorphism.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Roman Suzi <[EMAIL PROTECTED]> writes:
> As for concepts, they are from Generic Programming (by Musser and
> Stepanov) and I feel that Python is in position to implement them to
> the fullest extent.  And IMHO it will be nicer than just Java-like
> interfaces or Eiffel's contract approach.

I keep hearing that term (GP).  Can someone explain in a few sentences
what it means, without resorting to marketing buzzwords?

There is nothing in Wikipedia about it.
-- 
http://mail.python.org/mailman/listinfo/python-list



Concepts RE: Python evolution: Unease

2005-01-05 Thread Roman Suzi
On Wed, 5 Jan 2005, EP wrote:

>Roman wrote:
>
>> Maybe OP doesn't yet fully comprehend the ways of Python universe?
>
>
>
>> > Don't misinterpret this response. I know it was a rambling. But
>> *maybe* you
>> > have something to contribute to Python development, even good ideas
>> only and
>> > no work.
>> >
>> > .Facundo
>
>
>Am I selling Snake Oil?
>
>What I do have is a "forest" instead of an "in the trees" perspective, and
>from a forest view I see a lot of defensiveness about Python's hypothetical
>shortcomings.  No one needs be defensive, Python is an amazing programming
>language, and everyone involved with its development, evolution, support and
>codebase ought to feel quite good about it.

-skip-

It's c.l.p and people are free to express their opinions. Even negative.
This helps improve Python.

As for concepts, they are from Generic Programming  (by Musser and Stepanov)
and I feel that Python is in position to implement them to the fullest extent.
And IMHO it will be nicer than just Java-like interfaces or Eiffel's contract
approach.

I can try to write a PEP "Generic Programming Concepts".


Sincerely yours, Roman Suzi
-- 
[EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3
-- 
http://mail.python.org/mailman/listinfo/python-list