Chris Angelico <ros...@gmail.com> writes:

> On Fri, Jun 6, 2014 at 7:23 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>> On 05/06/2014 21:07, Alain Ketterlin wrote:
>>>
>>> Sturla Molden <sturla.mol...@gmail.com> writes:
>>>
>>>> On 05/06/14 10:14, Alain Ketterlin wrote:
>>>>
>>>>> Type safety.
>>>>
>>>> Perhaps. Python has strong type safety.
>>>
>>> Come on.
>>
>> I don't understand that comment, please explain.
>
> "Type safety" means many different things to different people. What
> Python has is untyped variables, and hierarchically typed objects.
> It's impossible to accidentally treat an integer as a float, and have
> junk data [1].

It's impossible in Swift as well.

> It's impossible to accidentally call a base class's method when you
> ought to have called the overriding method in the subclass, which is a
> risk in C++ [2].

I don't how this can happen in C++, unless you actually have an instance
of the base class. Anyway, I didn't mention C++.

[I agree with the rest of your explanation.]

-- Alain.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to