Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's been years since typing was added to Python, and many people still underestimate it. You're right; Python with strict type hints is more type-safe than Java and Go. It even has features like pattern matching and proper enums, both of which Go lacks.

The only issue is that some libraries (not many!) are still untyped, so you may need to write wrappers or stubs occasionally. But that applies to a small and decreasing minority of libraries.

I only wish Python were faster and had ahead-of-time binary compilation.



You should give Julia a go, can be written completely static if desired (not as static as rust of course, but compared to python it’s miles ahead). Can be made fast, very fast. AOT compilation with trimmed executables is coming in 1.12


Doesn't Julia suffer from very long startup times? One of the things I use Python for is CLI programs. The startup time isn't great either, but Julia was even worse last I tested.


Julia v1.12, the unreleased version which is currently in release candidate stage (and has had a longer RC stage than expected but should be done at least by the end of the year) has the ability to fully ahead of time compile and generate binaries, like you would expect from a language like C. It also trims these binaries so that they are a reasonable size given the elements of the runtime that are used. Thus for good type-stable code you get callable binaries without JIT overhead, and this leads to a much better CLI experience. It will take a bit of time so that there's more package tooling and support built around this feature, but this is the path a lot of the ecosystem CLI tooling is now going and that will be a pretty dramatic shift in the usability for these kinds of use cases which Julia had traditionally ignored.


aot will help a lot. In cases of simple programs you can also start Julia with no optimizations, which trade off the startup latency for runtime speed.


Python sure is slow. It's not that big a problem most of the time, but once it becomes relevant, it becomes super relevant. The lack of AOT binary compilation also is very annoying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: