top | item 41265385

(no title)

h8hawk | 1 year ago

Perhaps some people don't want to touch JS/TS

discuss

order

mapcars|1 year ago

TS is actually has better typing than Python (mypy). And the whole React (Vue, etc) infrastructure around it. Without these two things I wouldn't even bother writing frontend code.

infamia|1 year ago

Idk they're just different tradeoffs to me. Types are real and enforceable at runtime in Python (e.g, pydantic). Types in TS/JS are a fake veneer that add a build step. Is that categorically better? I don't love Python typing syntax.

pphysch|1 year ago

The browser doesn't support TS though. The browser does support Python via PyScript/pyodide/etc.

You can't run TS in the browser unless you jump through the same hoops that PyScript is.