Are the critiques in "All the things I hate about Python" valid?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Tue Feb 20 11:44:44 EST 2018
On Tue, 20 Feb 2018 14:12:08 +0100, Anders Wegge Keller wrote:
> På Tue, 20 Feb 2018 12:28:25 +0000 (UTC) Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> skrev:
>> On Mon, 19 Feb 2018 16:34:29 +0100, Anders Wegge Keller wrote:
>>
>> > På Mon, 19 Feb 2018 15:15:19 +0000 (UTC) Steven D'Aprano
>> > <steve+comp.lang.python at pearwood.info> skrev:
>> >> On Mon, 19 Feb 2018 14:06:36 +0100, Anders Wegge Keller wrote:
>> >>
>> [...]
>> >>
>> >> That's a mighty powerful claim that goes against the documentation
>> >> for the array module. Can you back your claims up?
>> >>
>> >> Here's an array and a list:
>> >
>> > Make me an array of tuples with two integers and a string, and we
>> > can talk.
>>
>> The array module's failure to support the specific type you want has no
>> bearing on whether or not Python is statically typed.
>
> You claimed Array could do what I requested, i.e. container type that
> guaranteed only one type inside.
And that's exactly what array does: it guarantees only one type inside.
It doesn't happen to be the type you want (a tuple of two integers and a
string), but that's irrelevant to the question of whether the arrays and
their content are strongly typed or not.
If you want to say that array doesn't solve your problem, I have no
argument with that. I'm not surprised: array is intentionally a very
restricted type. I mentioned it as an example of something *similar* to
what you want: a homogeneous sequence type with strong typing. I never
said it would solve your (unknown, unstated) problems.
https://mail.python.org/pipermail/python-list/2018-February/730916.html
> Furthermore, you are misrepresenting C with malice.
Am I? With *malice* you say. What gives you such insight into my state of
mind?
I don't think I've said very much about C except to say that it's known
to not be type-safe. I don't think that ought to be controversial to
anyone. C and C++ are well-known to be unsafe languages:
https://blog.regehr.org/archives/213
and type-safety is a subset of that. That's why there's so much interest
in new languages like Go and Rust. But I also suggested that some level
of type-unsafety is probably unavoidable for a systems language.
But okay, if I've misrepresented something about C, please explain, I'm
happy to learn better.
> I don't care why you feel that a simple observation is a personal
> attack,
Who mentioned anything about a personal attack?
You're making technical claims that Python values aren't strongly typed.
I think you're wrong, and said so, but offered to admit that *I* was
wrong if you can demonstrate the correctness of your claims by actually
changing the type of a list or array object in Python.
You've been unable to do so.
Rather than engage in good faith discussion, you're now trying to
distract by making insinuations about my character (claiming I'm acting
out of "malice", making me out to be complaining about "personal
attacks") and now personal insults:
> but I see you behave as a spoiled kid.
> go and pout in your corner.
The bottom line is, you've made technical claims that you are unable to
support. If you can back up those claims, then I will learn something.
How about you?
--
Steve
More information about the Python-list
mailing list