On Mon, 30 Nov 2026 18:35:21 -0000 (UTC)
Lawrence D’Oliveiro <l…@nz.invalid> wrote:
> On Mon, 30 Nov 2026 07:02:33 +0100, Bonita Montero wrote:
>
> > Am 30.11.2026 um 00:10 schrieb Dan Cross:
> >
> >> To tie this back to C, C is a weakly-typed language; add a number
> >> to a string literal and the result is a pointer. This has been a
> >> source of a _huge_ number of bugs over the years.
> >>
> > That's a matter of semantics and not of stongly vs. weakly typed.
>
> Python doesn’t allow the same mistake. Yes, it is a loophole of the C
> type system. So yes, you can say that, in this instance, C is “weakly
> typed”.
May be, not in this specific case, but there are places where Python
does implicit type conversions. In particular, it routinely implicitly
converts int (i.e. bigint) to floating-point. If we follow the most
rigorous definition of strong typing, implicit conversions are verboten.