On Sat, 14 Nov 2026 13:23:35 -0500, Arne Vajhøj wrote:
> * Python without type hint, Python with type hint, PHP and Groovy
> without type
> happily allows variables changing type with assignment [BAD]
Do you know why they’re called “hints”?
> Let us look at function overload.
>
> $ type fol.py
> def f(v: int):
> print(f"int : {v}")
>
> def f(v: str):
> print(f"str : {v}")
That’s not how to do it
<https://docs.python.org/3/library/functools.html#functools.singledispatch>.
Remember, “def” and “class” statements are not declarations, they are
best considered as a special form of assignment statement.
> And I know you can code in Groovy. :-)
Groovy does also have more flexible syntax (DSLs) ...