[Python-Dev] PEP 246, redux
Alex Martelli
aleax at aleax.it
Wed Jan 12 16:50:55 CET 2005
On 2005 Jan 12, at 16:26, Guido van Rossum wrote:
...
> [Alex]
>> I'm saying that if, by mistake, the programmer has NOT
>> registered the A->C adapter (which would be easily coded and work
>> perfectly), then thanks to transitivity, instead of a clear and simple
>> error message leading to immediate diagnosis of the error, they'll get
>> a subtle unnecessary degradation of information and resulting
>> reduction
>> in information quality.
>
> I understand, but I would think that there are just as many examples
> of cases where having to register a trivial A->C adapter is much more
> of a pain than it's worth; especially if there are a number of A->B
> pairs and a number of B->C pairs, the number of additional A->C pairs
> needed could be bewildering.
Hm? For any A and B there can be only one A->B adapter registered. Do
you mean a number of A->B1, B1->C1 ; A->B2, B2->C2; etc? Because if it
was B1->C and B2->C, as I understand the transitivity of PyProtocols,
it would be considered an error.
> But I would like to see some input from people with C++ experience.
Here I am, at your service. I've done, taught, mentored, etc, much
more C++ than Python in my life. I was technical leader for the whole
C -> C++ migration of a SW house which at that time had more than 100
programmers (just as I had earlier been for the Fortran -> C migration
back a few years previously, with around 30 programmers): I taught
internal courses, seminars and workshops on C++, its differences from
C, OO programming and design, Design Patterns, and later generic
programming, the STL, and so on, and so forth. I mentored a lot of
people (particularly small groups of people that would later go and
teach/mentor the others), pair-programmed in the most critical
migrations across the breadth of that SW house's software base, etc,
etc. FWIW, having aced Brainbench's C++ tests (I was evaluating them
to see if it would help us select among candidates claiming C++
skills), I was invited to serve for a while as one of their "Most
Valued Professionals" (MVPs) for C++, and although I had concluded that
for that SW house's purposes the tests weren't all that useful, I did,
trying to see if I could help make them better (more suitable to test
_real-world_ skills and less biased in favour of people with that
"language-lawyer" or "library-packrat" kind of mentality I have, which
is more useful in tests than out in the real world).
I hope I can qualify as a C++ expert by any definition.
> C++ goes to great lengths to pick automatic conversions (which perhaps
> aren't quite the same as adaptations but close enough for this
> comparison to work)
I agree with you, though I believe PJE doesn't (he doesn't accept my
experience with such conversions as a valid reason for me to be afraid
of "close enough for this comparison" adaptations).
> and combine them. *In practice*, is this a benefit
> or a liability?
It's in the running for the coveted "Alex's worst nightmare" prize,
with a few other features of C++ - alternatively put, the prize for
"reason making Alex happiest to have switched to Python and _almost_
managed to forget C++ save when he wakes up screaming in the middle of
the night";-).
Alex
More information about the Python-Dev
mailing list