Requiring the max old space flag is already too much. It's annoying.
Python does indeed have some runtime type safety. Way more than any JS runtime I've used. And I've written way more Node/JS/TS than Python.
In terms of the compiler, Nah. The whole ecosystem stinks. I cannot wait to move my larger Node projects to Java or something else. Idk how much dev time people waste on arcane tsc or npm issues but the answer is "too high" regardless. At least esbuild is okay.
Rust is neat. I wrote a decent sized side project backend (weatherfy.com) in Rust, with sqlx, postgres, and axum. Shared cache was tough to figure out but everything else was easy.
The whole backend has like one lifetime annotation, so that wasn't too bad. Honestly, I'd use it again, but the compile times scare me.
- New libraries can't just be deployed to the OS, they must be compiled into the project.
- A check for thing==nil doesn't always work for all types of nil. Yes nil does not always equal nil.
- Panics aren't necessarily a bug. They could be a feature (?). Crashes are always a bug in C.
- Garbage collection is mandatory in go. C people are used to managing memory themselves like going for a walk. It's kinda natural.
- GC causes hard to debug performance issues. This was true in Java. And it's true in Golang.
- Golang channel primitives has bugs of their own with deadlocks and other interesting behaviors, whereas a lot of the threading issues in C are pretty well understood.
Rust is for when you really need to perform manual memory management. If you don't need that, then a GC language is better.
If you're choosing manual memory management over GC, you better have a really good reason to do so or a really small application that you're writing.
Incorrect. The compiler forces you to handle memory properly. It doesn't, as far as I know, manage it for you.
The burden is on the programmer to do it correctly. The compiler stops the programmer from doing it incorrectly.
Compare with GC, where the programmer is freed from the burden of worrying about memory altogether.
The first part Rust does for you.
The second part you'll indeed have to do yourself and the compiler will force you to do it safely.
You admitted your opinion would be controversial. Guess what? It is. Hardly anyone wants to do ML in TS. No ML researcher <wants ? <to> | deal | with < type signatures > (like ? This)>>>>
> the insanity of
welp, so much for that.
javascript is terminally single threaded, with the only solution being either multiprocessing and message passing, or cooperative multitasking style promises/async. This is not a situtation where javascript pulls ahead, as hard as python seems to try to fall behind.
> No.
I mean.
>>> 1 + "1"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
I'll discuss facts
> tsc is the only compiler I've had to step through with a debugger multiple times.
99.9% of Typescript developers never ever had to do that. Sounds like a "you" problem
> No DS/ML researcher wants to deal with VM args just to use more than 1GB of memory. That alone would cause so much frustration.
You're talking about NodeJS, which is just one of the many JS engines. It's also 200% easier to start NodeJS with a flag to increase the (sane) default memory limit, as compared to the insanity of setting up a Python environment.
> Not to mention unpredictable generational GC.
Is Python GC better? Really? The good thing with Python is that the whole language is so slow that GC is just a drop in the bucket. On the other hand, Millions (Billions?) have been spent optimizing JS engines and it shows. Also: GIL.
> Or the crazy crap people do with the type system (what you call better other people call a mess).
I don't know what you're talking about, TypeScript go Brrr and I get magnificent Intellisense and subtle type checking, while MyPy and friends keeps crapping their pants
> At least Python has some semblance of runtime type safety.
No. And critically it has no semblance of comp time type safety either.