Hacker News new | ask | show | jobs
by liuliu 740 days ago
The math type inference example makes the usual claim that "what if Swift can replace Python" a non-starter. As someone who have to deal with this on frequent basis, it is pretty sad.

(I maintains s4nnc and a fork of PythonKit).

2 comments

> what if Swift can replace Python

What a ridiculous statement. I’m willing to bet everything I have in life that this is never going to happen.

In retrospective, yes. But Swift for TensorFlow and similar projects received much attention at a time. (Also see Mojo as another attempt).
Probably not Swift, but you know at some point Python will be surpassed in popularity by something else right? This has happened many times to programming languages in the past.
Does this improve when declaring all variables with explicit types before using them in expressions?
Yeah, but people do like to write y = .log(x * 0.1) + (1.24).squareRoot() type of expressions for what Python did best (NumPy and PyTorch).