Hacker News new | past | comments | ask | show | jobs | submit login

On one hand it's nice that there's a standard way to specify types in Python now, but TBH, if I'm going through the trouble of specifying types then I'm going to use a language that has them built in and fully exploits them. In particular, not using them for performance tuning seems like a big miss.



Like Cython? A superset of Python that supports ``cdef`` typing. Write Python, then add types for 100x speedup at the bottleneck.


Agree. At that point it's just better to go back to Java or <insert your favorite statically typed language here>. Java has a broad solution to type safety and a standard doc format for code. Sure there are awkward corner cases around things like type erasure but I find Java for the most part just works.


Disagree, performance is a side-effect of type safety... it's main use is to prevent bugs and help devs reading code. Also we use Python for the library ecosystem, easy to read syntax etc. which Java will probably never match. For performance, use Go or Rust and get everything Java has plus an active modern community.


Performance and type safety are absolutely linked. The only major reason JS is still 5-10x slower than Java is looseness of types preventing optimizations.

The Java community is still vibrant and much larger than Go and Rust put together. Modern stuff like RxJava, Lombok, MapStruct, streams, Guava, Gson, Retrofit, DropWizard, Vert.x, etc... Make Java a breeze these days. The learning curve is just steep.

And the Java ecosystem is easily larger than Python. Python may be nearly as popular now, but Java has been in the top three for nearly two decades.

A lot of shops use "vanilla Java" out of ignorance without modern libraries and it's crufty as hell. It's similar to shops still using JQuery hacking vs those that have awakened and use React and Typescript, practically a different language


> And the Java ecosystem is easily larger than Python. Python may be nearly as popular now, but Java has been in the top three for nearly two decades.

And we should not care in 2018. Let me use Rust or whatever, I'll call your Java-based service if I need to use it.


gRPC is a godsend


"modern." I hear that word a lot. What are the concrete benefits of those languages beyond subjective properties like readability? COBOL is readable if you work with it regularly.

Just as an example the Golang scheme for managing package dependencies still leaves much to be desired compared to the maven ecosystem commonly used in Java projects.


> Just as an example the Golang scheme for managing package dependencies still leaves much to be desired compared to the maven ecosystem commonly used in Java projects.

This is being fixed... https://research.swtch.com/vgo


Haskell has a sweet strongly typed compiler that infers types so you don’t have to get bogged down with boilerplate.

I think F# does as well if I remember correctly and it uses the .Net compiler (idk the name)


F#s type system is sweet, but the compiler is its own. Roslyn is the C# compiler and I'm not sure the F# compiler even has a cool name.




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

Search: