Why Java endures: The foundation of modern enterprise development
-
Yeah, they're probably talking about nulls. In Java, object references (simplified pointers, really) can be
null
, pointing nowhere and throwing an exception if you try to access them, which is fine when you don't have a value for that reference (for example, you asked for a thing that doesn't exist, or you haven't made the thing yet), but it means that every time you interact with an object, if it turns out to have been null, a null pointer exception is getting thrown and likely crashing your program. You can check first if you think a value might be null, but if you miss one, it explodes.Kotlin has nulls too, but the type system helps track where they could be. If a variable can be null, it'll have a type like
String?
, and if not, the type isString
. With that distinction, a function can explicitly say "I need a non-null value here" and if your value could be null, the type system will make you check first before you can use it.Kotlin also has some nice quality of life improvements over Java; it's less verbose (not a hard task), doesn't force everything to belong to a class, supports data classes which are automatically immutable and behave more like primitive values than objects, and other improvements.
I used to think C# was like Java but with fresh ideas. I still do, but Kotlin gives it a run for its money. The type system is pretty great. For example, you can use the Elvis operator to return early if something is null, allowing you to use a non-null type afterwards. In C#, nullable annotations feel more "grafted on", and there are some weird quirks and footguns that Kotlin avoids by being a little smarter about it.
-
Even if it was, there’s no way to know, people can just lie. It’s not like it will be obvious, some people might have a feeling it is (based on their experience playing with LLMs) but won’t be able to point exactly why.
That is exactly the point, and I wouldn't be surprised if soon there is more money to be made "certifying works made without AI" than there is selling API tokens for LLMs, i.e. the OpenAI business model (although I have no idea of what the technical implementation would look like, perhaps a mix of secure enclave computing offering only a predefined set of capabilities barred from AI, combined with a blockchain to persist and distribute the reference and hash of the works done? More to the tally of GenAI being a net loss for humanity).
-
I tend to find languages that are best of feature. If i need a fault tolerant, quick to continue service I'd probably pick Erlang or Elixir. If i need meta programming I'm going with Racket or Haskell. If i need a quick and dirty graphical tool for internal use only I'm writing it in tcl/tk or python/tk. If it's system code I'm using C and Assembly.
The problem i have with Java is outside of Android development I never have the use case i have at my corporate job. There we need a widely know language (so we can hire) that is used in a lot of web services (highly tested and bugs caught early and very visible) that has a diverse ecosystem (less custom built code). None of those attributes are needed in my hobby work.
I think Java fits the bill exactly for a quietly known language, used in a lot of web services, with a diverse ecosystem.
-
What language doesn't have its worts? My point is that Java is the defacto corporate service language so if that's what you're doing chances are the libraries you're using are also being used at FAANG or Fortune 500 companies who will spend the money to vet libraries, bug bounties and pay developers to escalate issues. If you pick a language that has no substantial use in your given field you won't get the same visibility.
And I just fear projects that will use Node.js for complicated domains like banking. Yes, there are people this kind of nuts in the market.
-