News for hackers. Stuff that matters.
Re:ZX – A tool for writing better scripts by from-nibly on Saturday February 10, 2024 @02:07AM (#39324226)
Here's an anecdote to help your gut. I'm a platform engineer who's favorite language is Typescript. I LIVE in the terminal. The only reason I use vscode is cause it's easier to put him into vscode than it is to put vscode into vim. Otherwise I'd be in the terminal for everything but browsing.
Re:ZX – A tool for writing better scripts by a_wild_dandan on Saturday February 10, 2024 @02:24AM (#39324303)
Likewise! I use TypeScript everywhere possible, and zx is a godsend. Unfortunately, I've recently dealt with gobs of Python for ML software. After years of writing TypeScript, it's been a...sobering reminder of many painful coding issues that I'd forgotten even existed. Made me deeply appreciate what TS gives us haha.
Re:ZX – A tool for writing better scripts by klabetron on Saturday February 10, 2024 @04:08AM (#39324727)
I worked at a Python shop for a bit. I spent more time than I wish to admit trying to make all of my Python behave like TypeScript (adding typings, etc.).
Re:ZX – A tool for writing better scripts by a_wild_dandan on Saturday February 10, 2024 @05:08PM (#39330683)
Ditto. Python(3.13) types are so crudimentary that it becomes a Sisyphian struggle. Library type support is patchy at best. **kwargs is an abomination. Python is incredibly slow. Async code and anonymous functions are awkward and verbose. Hell, Python is verbose.[1] I could complain endlessly, but I'm mainly just disappointed in how little has changed since I last professionally wrote Python. The biggest benefits were basically a) familiarity, and b) powerful stats/ML libs.

I hadn't seen analogs of `AttributeError`s and `TypeError`s for years, until revisiting Python and remembering that those are still unsolved issues outside of TypeScript. Ugh.

[1] https://news.ycombinator.com/item?id=36407112

Re:ZX – A tool for writing better scripts by dash2 on Saturday February 10, 2024 @03:47AM (#39324646)
Would a python developer feel the same in reverse?
Re:ZX – A tool for writing better scripts by Vinnl on Saturday February 10, 2024 @07:21AM (#39325638)
If they'd go to JavaScript, they'd feel a sense of unfamiliarity similar to what JS developers going to Python would feel.

But the Python equivalent of TypeScript is mypy, and I don't think it's controversial to say (even among Python developers) that it's way behind TypeScript, generally.

Re:ZX – A tool for writing better scripts by monbis on Saturday February 10, 2024 @01:13PM (#39328678)
Python now has type hints which makes it closer to typescript, and easier to code in.