News for hackers. Stuff that matters.
Re:Interfaces and Protocols in Python by marcinzm on Monday April 26, 2021 @09:18AM (#26942208)
Scripts where startup time matters.

Situations where you don't want the heavy-weight and complex JVM.

Cases where you need to interact with C/C++ code a lot (ML, etc.).

Companies where python is the norm and introducing another language adds a lot of overhead.

Re:Interfaces and Protocols in Python by remexre on Monday April 26, 2021 @11:09AM (#26943317)
GraalVM (and SubstrateVM) is actually fixing a lot of these; I had a short-lived process that I AOT compiled with SubstrateVM, and I spent a lot of time checking I had done it right and not somehow accidentally compiled in my input data as well or something -- I got a two order of magnitude speedup, with fewer than ten lines of code change.
Re:Interfaces and Protocols in Python by qyi on Monday April 26, 2021 @03:17PM (#26946764)
Replace Java with literally anything else (including whatever Java implementation does not have the issue) and the "startup time" red herring is gone.
Re:Interfaces and Protocols in Python by rualca on Monday April 26, 2021 @06:56PM (#26949380)
Java's punishing startup times is not a red herring, and I'm dumbfounded someone in a forum like HN makes such a claim. Even in serverless applications like AWS Lambda, python and javascript enjoy execution times that are an order of magnitude faster than Java ones, even with hot starts and stuff initialized a priori.
Re:Interfaces and Protocols in Python by qyi on Tuesday April 27, 2021 @04:23PM (#26961033)
I was saying that it's a red herring to go "oh people don't used typed languages because Java programs start up slow".
Re:Interfaces and Protocols in Python by marcinzm on Monday April 26, 2021 @03:48PM (#26947142)
Then you get different issues including more obscure and untested systems. I responded to someone asking why not use Java. I answered it. Please don't try to change the question after the fact when you don't like the answer.
Re:Interfaces and Protocols in Python by qyi on Tuesday April 27, 2021 @04:22PM (#26961019)
I know you're trying to pin me as being rude, but no. Your answer is bad and ad-hoc. Just because a language is not Java does not make it magically untested and obscure. Just use Go tbh.

Edit: Okay I see the original guy stated Java. It is what it is. The real useful answer is to just use any other typed language, and not use Python.