News for hackers. Stuff that matters.
Re:“I am literally losing sleep” over Java (1996) by TacticalCoder on Thursday January 06, 2022 @08:55AM (#29823533)
Ain't Java the 2nd most used language in the world, after JavaScript? The enterprise world uses Java everywhere. Java powers pretty much the entire banking infrastructure.

Aren't there billions of Java smartcards that people carry in their pocket/wallet and use on a daily basis?

Aren't there billions of Android apps installed that are, basically, Java?

One can dispute the numbers a bit but... How is Java not one of the biggest success story ever for a programming language?

I'd also add: it's kinda funny to see so many programmers hating on Java and thinking that, somehow, Java is dead or dying, yet on a daily basis they'll use one of the JetBrains tools, written in Java, to work on their "non Java" code.

I do not only think he was right to lose sleep over it: I think Java delivered.

Re:“I am literally losing sleep” over Java (1996) by thomascgalvin on Thursday January 06, 2022 @09:49AM (#29824158)
> How is Java not one of the biggest success story ever for a programming language?

It absolutely is.

Java isn't sexy, for the most part. It lets a lot of innovation happen in other languages, then takes the successful parts for itself. This is how we (eventually) got generics, lambdas, streams, and local type inference, for example.

Java slowly becomes more ergonomic, and that slowness - the slowness to change, not execution speed - is why it gets a lot of hate. Why use Java, when $LANGUAGE_OF_THE_DAY has $FEATURE_OF_THE_DAY?

What people fail to realize, what people fail to see the value of, is that this slowness means Java doesn't get worse. Java has avoided most unforced errors. It's not like C++, where the template language is both Turing complete and the fastest way to summon Beelzebub from the depths of his infernal pit, and where you need a team of PhDs to decide which version of `auto_pointer` actually works the way you think it does. It's not Javascript, where the framework your front-end lead sold you on last week has already been superseded by the hot new thing.

And you don't generally have to worry about compatibility. Until v9, you could take code written against the 1.0 spec of the language and expect it to run pretty much out of the box. And the changes post v9 honestly aren't that difficult to work through, as opposed to Python's 2 -> 3 split.

Java isn't the sexiest language out there, but it hits a very sweet spot, right in the middle of the "familiar", "stable", and "productive" Venn diagram. It's probably the second-most important computer language developed in my lifetime, after Javascript, and is without a doubt a smashing success story.

Re:“I am literally losing sleep” over Java (1996) by VHRanger on Thursday January 06, 2022 @10:22AM (#29824619)
I would say Java the language is fine, but the culture around it is what's grown the distaste many have for it. The overuse of design patterns, etc.

I also find it fun how Guy Steele had in retrospect the perfect plan for Java back in the 1990s, and it took them 15 years to come around to it:

https://www.youtube.com/watch?v=_ahvzDzKdB0

Re:“I am literally losing sleep” over Java (1996) by alexjplant on Thursday January 06, 2022 @10:53AM (#29825112)
> I would say Java the language is fine,

When I was using it I didn't particularly mind it except for the clumsy handling of functions (i.e. as objects instead of first-class citizens) and verbosity (no automatic accessors, implicit typing, etc). Adding Lombok solved most of these. *EDIT: Except for runtime type erasure of generics which caused (not sure about new Java) performance issues and made certain type operations difficult.

> but the culture around it is what's grown the distaste many have for it.

Having to debug esoteric issues with classpath, Spring, CDI, JPA, Aspect4j, etc. is hell on earth. I've lived that life and have no desire to do so again. Because Java is the lingua franca of enterprise development it also tends to rear its ugly head on modernization projects and rewrites. 80% of the abhorrently-engineered codebases I've encountered in my career were written in Java by body shops (C# and Coldfusion were the runners up).

> The overuse of design patterns, etc.

I'm not an adherent of the design pattern cargo cult but I'm one of four people under the age of 50 that have actually read the GoF book and I do indeed sometimes name objects after patterns described in the book; I typically design components and name them such after the fact as opposed to constructing systems from the ground up using design patterns. Calling a thing that persists comments in a database `CommentRepository` is a lot more useful than calling it `CommentHelper`.

Re:“I am literally losing sleep” over Java (1996) by stickfigure on Thursday January 06, 2022 @11:16AM (#29825446)
> Having to debug esoteric issues with classpath, Spring, CDI, JPA, Aspect4j, etc. is hell on earth.

The term "DLL Hell" came from Windows development before it. The Node/Ruby/Python equivalent is getting native libraries to build (node-gyp, I'm looking at you!). I've burned days in Ruby Version Hell and Node Version Hell. Javascript dependency upgrades are a nightmare compared to Java dependency upgrades.

I don't think this problem has gone away, or even improved. It's just a grim fact of life, and Java doesn't deserve special mention.

Re:“I am literally losing sleep” over Java (1996) by tombert on Thursday January 06, 2022 @12:44PM (#29826838)
Despite my love for the language (and Stack has mostly fixed this), I feel like Haskell's "Cabal Hell" is amongst my least-favorite headaches from my past.

Getting weird, hard to follow conflicts between different packages on Hackage and dealing with weird compiler hack flags is something that never got fun or easy.

Re:“I am literally losing sleep” over Java (1996) by alexjplant on Thursday January 06, 2022 @11:41AM (#29825834)
The things you mention are no fun either (`node-gyp` in particular), but the Java issues I encountered were far beyond run-of-the-mill runtime linking and interop issues you describe. The details are lost to time and a bit fuzzy but I recall the primary issue being competing CDI implementations stepping on each other when we tried to use JSF with a recent version of Spring... and because most everything in the Java ecosystem was doing some opaque Aspect4J magic it was nigh-impossible to debug.
Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @11:28AM (#29825639)
If you don’t like putting objects and classes on the left you can write

   import static example.Library.*;
And proceed to write in your main method

   var x = someFunction(6, ‘that’);
in a style like C, LISP, or ML. You can write a whole program (like the answer for a HackerRank problem) in a single file. The developers of Java have always respected the ML family and JDK17 incorporates pattern matching, records, algebraic types and and many other features that make functional programming fun.

The type erasure problem for generic classes goes away when you use generic methods; type inference works without limitation for generic methods and is great for defining APIs for internal domain-specific languages

   any(grammar,you.want(ifIt.parses(ON_THE_LEFT)));
the great thing about Java is a quality IDE is certain to support this programming style.

Any complaint that the internal DSL is too verbose can be attacked by the use of code generation which is straightforward to incorporate in a maven build and your IDE. (The LISPer is using code generation and you have to do it if you want to keep up.)

Re:“I am literally losing sleep” over Java (1996) by progmetaldev on Thursday January 06, 2022 @11:20AM (#29825517)
I think the real majority of hate that I've seen for design patterns are when juniors go into a system looking to slap a design pattern anywhere they possibly can, quickly creating a ball of mud that is difficult to work with and figure out. At least that's been my experience (and I have to sadly admit I did the same when I was a junior without a mentor to help me through figuring out how to refactor my code into these patterns only when needed).
Re:“I am literally losing sleep” over Java (1996) by matwood on Thursday January 06, 2022 @12:47PM (#29826890)
I'm under 50 and read the GoF book ;)

I'm one of the rare people who was writing vb and then c# during the terrible Java j2ee days. Then I got a job in a startup using Java which avoid the 'enterprise' idioms. So my experiences with Java over the last decade or so have been mostly good (except for a foray into Hibernate, never again - jOOQ for life). No crazy class models, no xml configuration, etc...

Re:“I am literally losing sleep” over Java (1996) by slaymaker1907 on Thursday January 06, 2022 @12:53PM (#29827000)
Amen to esoteric Spring issues. I once dealt with a jar that suddenly started failing despite no code changes because Spring uses the order of files in the zip file/jar to determine initialization order. Turns out one that particular time files ended up in a weird order inside the jar file.
Re:“I am literally losing sleep” over Java (1996) by The_Colonel on Thursday January 06, 2022 @01:45PM (#29827934)
It's natural to read and initialize the classes as they come, _unless the code defines a specific dependency order_.

This looks like a developer simply did not declare proper dependency between classes/beans.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @11:04AM (#29825284)
Try doing the same with CORBA and DCOM.
Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @10:31AM (#29824780)
If Common LISP had become popular I think there would be a popular distaste for everything about it and people would be wishing they could write code in PHP, Visual Basic, COBOL, Cold Fusion, etc. (There was a popular distaste for Common LISP at the time, it was hard to find a LISPer in the 1980s who liked it. Half of that was it was hard to fit it into a 16-bit machine and wouldn't become really implementable on microcomputers until a 32-bit OS was available... Thus BASIC got another decade of life extension.)

Until Java came around every book on Object Oriented programming (say "C++") had examples such as "Stack", "Queue", etc. In the case of Java you saw people starting to write objects mirroring the business and application domains. People who were trying to use objects in Smalltalk or C++ in 1990 just weren't accomplishing enough that somebody could step back and say "object orientation sucks", rather they were getting stuck and blaming themselves or blaming the tools, rather than the concept.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @11:03AM (#29825270)
I see this repeated all the time.

What people fail to realize is that the enterprise culture is language agnostic.

Before Java we were doing the same with C, C++, VB, Delphi, Smalltalk and whatever 4GLs one wants to dive into.

When Java gets replaced by TechX, the space ship enterprise architects will keep doing what they know best in TechX.

Re:“I am literally losing sleep” over Java (1996) by thomascgalvin on Thursday January 06, 2022 @10:43AM (#29824954)
> The overuse of design patterns, etc.

Java has been trending away from this for some time now. A modern Spring app looks nothing like an old J2EE app.

Re:“I am literally losing sleep” over Java (1996) by dagw on Thursday January 06, 2022 @10:52AM (#29825108)
A lot of us jumped off the Java train in disgust at the height of the J2EE craze and never looked back, so fairly or unfairly we'll forever be judging everything Java by that tainted memory.
Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @11:05AM (#29825295)
A framework originally designed for Objective-C, actually.
Re:“I am literally losing sleep” over Java (1996) by tombert on Thursday January 06, 2022 @12:46PM (#29826871)
Wait, is that true? I know WebObjects was designed around ObjC, but a quick ten seconds on Wikipedia doesn't indicate that J2EE was designed around ObjC initially.

----

Unnecessary opinion: I don't like either, but WebObjects sucks about 1/10th as much as J2EE.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @01:26PM (#29827617)
You should have spent more than ten seconds.

> By the time DOE, now known as NEO, was released in 1995, Sun had already moved on to Java as their next big thing. Java was now the GUI of choice for client-side applications, and Sun's OpenStep plans were quietly dropped (see Lighthouse Design). NEO was re-positioned as a Java system with the introduction of the "Joe" framework, but it saw little use. Components of NEO and Joe were eventually subsumed into Enterprise JavaBeans.

Taken from https://en.wikipedia.org/wiki/Distributed_Objects_Everywhere

Re:“I am literally losing sleep” over Java (1996) by tombert on Thursday January 06, 2022 @01:28PM (#29827668)
Ah, I was just quickly reading on the J2EE wikipedia entry and didn't see "Objective" anywhere on there.

You're absolutely right, thank you for clarifying!

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:04PM (#29828250)
No issues, and here is another one, while Java might have a C++ like syntax to make it more appealing to mainstream, its main influence was Objective-C, not C++.

https://cs.gmu.edu/~sean/stuff/java-objc.html

Hence interfaces, dynamic loading, reflection and so forth.

Re:“I am literally losing sleep” over Java (1996) by tombert on Thursday January 06, 2022 @02:12PM (#29828365)
Interesting.

Bringing it back to a previous point I made, I met someone who claimed to have helped port over the WebObjects framework from Objective-C to Java, and he claimed that while it's not a 1-to-1, you can fairly easily map a lot of the Objective-C semantics to Java, making the porting process not that hard.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:19PM (#29828507)
Re:“I am literally losing sleep” over Java (1996) by smrtinsert on Thursday January 06, 2022 @01:48PM (#29827983)
Yep spring since 1.12 here.
Re:“I am literally losing sleep” over Java (1996) by fsdjkflsjfsoij on Thursday January 06, 2022 @12:56PM (#29827052)
Modern Spring Boot is still incredibly bloated and full of questionable design patterns. A simple web application should not consume hundreds of megabytes of RAM by default and startup time on modern hardware should be basically instantaneous. Classpath scanning and annotations are still massively overused and most of the time they're accomplishing little more than obfuscation and turning compile time errors into runtime errors.
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @03:32PM (#29829641)
Why exactly? How often do you start up a web application? And it’s not like the RAM is not there to use it — thread pools, db connection pools, etc have to be set up.
Re:“I am literally losing sleep” over Java (1996) by txru on Thursday January 06, 2022 @12:03PM (#29826176)
Since that's an hour-long video, what do you consider the most salient points of his plan for Java that it ended up embodying eventually?
Re:“I am literally losing sleep” over Java (1996) by VHRanger on Friday January 07, 2022 @03:30PM (#29844370)
About user-grown features. Over time, Java let users expose more lower level details to the language than before.

But, really, watch the talk. It's one of the best conference talks in computer science history.

Re:“I am literally losing sleep” over Java (1996) by itronitron on Thursday January 06, 2022 @12:37PM (#29826709)
Just like any other language, in order to use Java well you have to ignore a lot of the hyped up techniques.
Re:“I am literally losing sleep” over Java (1996) by smrtinsert on Thursday January 06, 2022 @01:46PM (#29827955)
Overuse of design patterns seems like decades ago.
Re:“I am literally losing sleep” over Java (1996) by polotics on Thursday January 06, 2022 @03:51PM (#29829955)
Sadly it is not: they still get taught, and then juniors come and they expert-beginner projects to death. And yes in 2022 expert-beginner is a verb! Cheers
Re:“I am literally losing sleep” over Java (1996) by smallhands on Thursday January 06, 2022 @01:02PM (#29827180)
it is painful watching this video . presentation software and projectors are truly blessing
Re:“I am literally losing sleep” over Java (1996) by noblethrasher on Thursday January 06, 2022 @10:38AM (#29824879)
Java's (Oracle's) strategy is to spend most the innovation on the runtime, and in that regard, it's probably the most advanced platform. The net effect is that you can write some pretty naïve and boring OO-style code that will almost always perform superbly. This is a good thing, and something that I envy as a C# programmer.
Re:“I am literally losing sleep” over Java (1996) by __float on Thursday January 06, 2022 @10:18AM (#29824568)
Writing Java in my day job currently, I really miss C#. It feels slightly more like a "Java done right" -- the same strategy of bringing "fancier" features from F# or other languages, but it has just a _few_ more features that make day to day development just a little more pleasant.
Re:“I am literally losing sleep” over Java (1996) by shellac on Thursday January 06, 2022 @10:47AM (#29825016)
C# is an excellent contrast. It has always moved quicker than java (not hard), but that has left some features that in retrospect seem half baked. For example they needed some sort of function reference thing, so we had 'delegates', but then later we got lambdas with LINQ. And although LINQ has a lot of good parts, I'm not sure the expression bit was a good idea even people familiar with SQL linked it.

And reified generics are nice for c#, but a right pain if you want to implement another language on the CLR which isn't very c#-ish.

More recently I'm still not sure why, in a language with an extensive runtime and its own VM, they went with async / await rather than fibers or continuations like go and java. It was probably simpler to implement initially, of course.

Even slow moving java shows that bad decisions have a cost down the road even if the features are unused: there can be monitors on any object to support synchronisation, serialisation similarly lurks around internally.

Re:“I am literally losing sleep” over Java (1996) by tsimionescu on Thursday January 06, 2022 @11:10AM (#29825358)
> More recently I'm still not sure why, in a language with an extensive runtime and its own VM, they went with async / await rather than fibers or continuations like go and java. It was probably simpler to implement initially, of course

Async/await work much much better than goroutines for GUI programs, which was still a major market at the time this feature was added to C#. Since there is a single GUI thread where everything that touches the GUI must live, but you do want your application to have multiple other threads, you need to give the programmer this kind of control and can't rely on a more simplistic Go-style green threads runtime.

I believe COM also has some similar requirements, but I am less sure than I am for GUI.

Finally, C# has a lot of influence from the functional langauge community, so it's possible that async/await and Task values were a more appealing solution given those particular tastes.

Re:“I am literally losing sleep” over Java (1996) by Zababa on Thursday January 06, 2022 @11:36AM (#29825766)
> Async/await work much much better than goroutines for GUI programs, which was still a major market at the time this feature was added to C#. Since there is a single GUI thread where everything that touches the GUI must live, but you do want your application to have multiple other threads, you need to give the programmer this kind of control and can't rely on a more simplistic Go-style green threads runtime.

Couldn't you have the GUI thread on one core, and the "goroutine pool" taking all the other cores, and distribute work on that pool? The model would be a bit more complex than Go, but considering C# is made for a wider variety of usages, multiple models wouldn't be so far fetched.

Re:“I am literally losing sleep” over Java (1996) by vips7L on Thursday January 06, 2022 @11:31AM (#29825689)
> Since there is a single GUI thread where everything that touches the GUI must live, but you do want your application to have multiple other threads, you need to give the programmer this kind of control and can't rely on a more simplistic Go-style green threads runtime.

Isn't that just a limitation of Go since its goroutines all run in the same pool? As far as I know, in the Java implementation you'll be able to create virtual thread pools from regular threads (i.e. the gui thread) and then have another virtual executor for the rest of your program. You'll still have the backend vs gui split but you won't have the entire async await split for the rest of your application.

Re:“I am literally losing sleep” over Java (1996) by pionar on Thursday January 06, 2022 @12:40PM (#29826765)
I mean, technically, you don't have to have async/await in C#. Nothing's stopping you from using threads from the thread pool.
Re:“I am literally losing sleep” over Java (1996) by politician on Thursday January 06, 2022 @11:42AM (#29825856)
IIRC, they went with async/await because it could be implemented through desugaring in the compiler using a technique similar to what they had implemented a few months earlier with IEnumerable. That is to say, the team was thinking about desugaring at the time the need for asynchronous functions arose and they were not thinking about CSP. Remember that C# was in production at the time and they needed something that would not potentially upset the world.
Re:“I am literally losing sleep” over Java (1996) by orthoxerox on Thursday January 06, 2022 @04:15PM (#29830272)
> More recently I'm still not sure why, in a language with an extensive runtime and its own VM, they went with async / await rather than fibers or continuations like go and java. It was probably simpler to implement initially, of course.

No one was willing to approve another extension of the old runtime, and a major one at that. If they had already completed the .Net Core rewrite back then they would've probably baked async into the runtime.

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @10:27AM (#29824713)
Nah, C# has a shitton of more features, some of them indeed making the day to day development more pleasant, while the other ones are known only by a handful of people, has strange interoperability with everything else or is superseded already by another one. It is really on the way to become as complex as C++ is.
Re:“I am literally losing sleep” over Java (1996) by tkot on Thursday January 06, 2022 @11:35AM (#29825734)
Could you list these features? I was under the impression that apart from some things that can be easily done in C# but are pretty much impossible to do in Java (like value types* and pointers) the languages were pretty similar.

Some C# things seemed rather strange (like delegates), some purely cosmetic (like indexers) and there were also things that Java had but C# did not like covariant return types (available from C# 9.0)

*Project Valhalla is supposed to bring it to Java but I wouldn't hold my breath waiting for it.

Re:“I am literally losing sleep” over Java (1996) by _old_dude_ on Thursday January 06, 2022 @12:39PM (#29826740)
The "dynamic" keyword [1] is my favorite blunder in C#. It's great if you are use it for COM interropt but it's awful otherwise.

The code compiles but from time to time it fails at runtime and performance are sometimes Ok, sometimes not depending on the call stack.

[1] https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...

Re:“I am literally losing sleep” over Java (1996) by sterlind on Thursday January 06, 2022 @03:07PM (#29829248)
dynamic is amazing for the extremely niche use case of interop with dynamic languages. I had a system which executed Python scripts on devices using an orchestrator written in C#. With dynamic and IronPython, I could seamlessly unit test the whole enchilada without writing un-Pythonic Python or ugly C# wrappers.
Re:“I am literally losing sleep” over Java (1996) by lou1306 on Thursday January 06, 2022 @12:24PM (#29826507)
Accessors come to mind:

    class Foo {
        int Bar { get; set }
    }
Allow you to get/set the value of someFoo.Bar as if it were a public member. If you want read- or write-only members, you just remove the "set" or "get" portion. If at some point you need to add logic to the setter, you just do

    int Bar { get; set { /* setter logic goes here */ } }
You still use assignment syntax ("someFoo.Bar = newValue"), but this syntax is desugared into a call to the setter method. Ditto for the getter.

IMHO they make class APIs much cleaner and forward-compatible (on the other hand, if you started with a public member and then need to add a proper setter with some logic, you would break the API).

Also, non-nullable types are a pretty nice way to avoid checking for null every other line of code.

And these are literally just the first couple examples that came to mind.

Re:“I am literally losing sleep” over Java (1996) by tkot on Thursday January 06, 2022 @05:29PM (#29831354)
I think this is can be handled with Lombok using @Getter and @Setter annotations (https://projectlombok.org/features/GetterSetter). It is not exactly the same because you call generated methods instead using assignment syntax but I guess it's close enough - if you need some custom logic in the getter/setter then you remove the annotation and write your own implementation (I think Lombok might be smart enough to ignore the annotation if an appropriately named getter/setter is present).

Non-nullable types sound great, I wonder if this could be introduced to Java in a backwards-compatible way (I suppose it would follow the same path with introducing explicitly nullable types first, though I guess it could be handled using Optionals?).

Re:“I am literally losing sleep” over Java (1996) by pulse7 on Thursday January 06, 2022 @12:40PM (#29826756)
If you need a shortcut for accessors, you may aswell make your fields public and avoid get/set altogether...
Re:“I am literally losing sleep” over Java (1996) by jerf on Thursday January 06, 2022 @01:25PM (#29827604)
This allows you to override the logic later. Public fields in a language where "x.y" means "directly access field y on value x" don't allow that; x.y forever means "directly access field x" and you can't later interpose code between attributes and the code accessing it.

This isn't the only way of doing it, depending on your language. Python has a completely different mechanism where a class can start with a directly-accessed "y", but in a later version make it a property. (More than one, actually.) Some languages route all property accesses through something you can hook. Some languages simply automatically do what C# is doing here.

Semantically and abstractly, there's no reason to every not be able to override a property access in later versions like that, because it is so darned useful. Unfortunately, performance wise, it's hard to beat a language that guarantees structure layout and guarantees that x.y can be compiled into a single constant memory load instruction, and unfortunately, you can't just wave "compiler optimization" at the problem and make it go away (considered in isolation this seems like an obvious solution but as usual as it starts interacting with all the other features it gets much harder than the simple cases). The higher performance languages have a strong reason to give people ways to get guaranteed direct struct member accesses.

Re:“I am literally losing sleep” over Java (1996) by jdmichal on Thursday January 06, 2022 @03:00PM (#29829127)
Though please note that if you "upgrade" anything from a field to a property, you need to recompile any dependencies. Otherwise they will obviously try to invoke the field that no longer exists, instead of calling the property methods.
Re:“I am literally losing sleep” over Java (1996) by pivo on Thursday January 06, 2022 @01:19PM (#29827496)
Not if you need to implement some setter logic though, or want to reserve the option to do so in the future. And not if you want those instance variables to be available as JavaBean properties.

I haven't developed in Java in a long time, but public instance variables were a no-no when I did for these reasons.

Re:“I am literally losing sleep” over Java (1996) by Mikeb85 on Thursday January 06, 2022 @12:19PM (#29826433)
Why not start incorporating Kotlin? It's basically what you want, is an easy transition and has JetBrains' backing so the tooling is there...
Re:“I am literally losing sleep” over Java (1996) by thomascgalvin on Thursday January 06, 2022 @10:42AM (#29824934)
> [C#] feels slightly more like a "Java done right"

This is how I feel about Kotlin.

Re:“I am literally losing sleep” over Java (1996) by ajross on Thursday January 06, 2022 @10:33AM (#29824803)
> Java isn't sexy, for the most part.

In 1996, Java was pretty darn sexy. Managed runtimes in a high performance[1] language were an absolute revelation at the time.

It's absolutely true that as it evolved, Java grew to embrace the affects and aesthetics of its biggest customers (Enterprise backend coders). And that's not sexy at all. But at the time? We all thought this was going to be the systems language for the next century.

[1] Almost. At the time this email was written, the first JIT JVM was still a few months out from its early beta releases. But Gates could absolutely see where the wind was blowing.

Re:“I am literally losing sleep” over Java (1996) by 62951413 on Thursday January 06, 2022 @12:55PM (#29827034)
It was about 10 years ago that the community agreed that it was the JVM that was successful. It's a platform with multiple viable languages. Scala obviously comes to mind. Kotlin is a somewhat mixed case because its popularity comes from the mobile world where you don't really have the JVM.

Java is not the most pleasant language for sure. It started as a dumbed-down as golang was (still is?) for years. It's still catching up with C++ (e.g. see all the Valhalla project discussions on HN). It certainly shows its age. It's not clear to me why so many people are still fixated on Java when solid alternatives have existed for years within the same ecosystem.

Also, if you don't like JPA try JOOQ.

Re:“I am literally losing sleep” over Java (1996) by native_samples on Friday January 07, 2022 @07:56AM (#29838560)
Kotlin is pretty popular on the server side too, and Kotlin (the same compiler) generates JVM bytecode for both mobile and server in the same way because Android very much has a JVM.
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @03:35PM (#29829679)
How could it catch up to C++? They are not even in the same category of languages, other than some surface level syntax, they are as different as they get.
Re:“I am literally losing sleep” over Java (1996) by Zababa on Thursday January 06, 2022 @11:34AM (#29825728)
> It's not like C++, where the template language is both Turing complete and the fastest way to summon Beelzebub from the depths of his infernal pit, and where you need a team of PhDs to decide which version of `auto_pointer` actually works the way you think it does.

Value types on the JVM have been described as "6 PhDs, knitted together". In C and C++, this is just struct.

> It's not Javascript, where the framework your front-end lead sold you on last week has already been superseded by the hot new thing.

You should stop spreading stuff like that, it's false. React has been the most popular frontend framework for 6 years at this point, and Express the most popular backend framework in JS for at least 8 years. The backwards compatibility of JS is at least as good as Java, ES5 and ES6 were great upgrades (a bit like Java 5 and 8 in a way).

I like Java and I think it's very important. I can say that without feeling the need to dismiss other languages that are as important as Java to the modern world.

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @11:47AM (#29825914)
> 6 PhDs, knitted together

But that is regarding the implementation/specification. For the users it will be two new keywords and .ref. It will even ease the language by healing the rift between primitives/objectsz

Re:“I am literally losing sleep” over Java (1996) by Zababa on Thursday January 06, 2022 @12:08PM (#29826249)
C++ has been used by lots of people without PhDs to great success. The language is not perfect, but for most people it's far from the hell that's described in the comment I replied to. Some people will complain about the AbstractFactoryBeanInterface in Java and say that it's hell, they are the minority. Same with C++.
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @12:26PM (#29826537)
I’m not saying that C++ needs PhDs to write, but it is one of the most complex languages out there. Even just basic usage is considerably hard (RAII, r/l-values, etc). Of course it is in part inherent in the system programming domain.

But Java is a trivial language comparatively, your mentioned complexity is user-generated.

Re:“I am literally losing sleep” over Java (1996) by secondcoming on Thursday January 06, 2022 @01:37PM (#29827810)
It's interesting that you find RAII hard. I've not heard this opinion before.
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @03:09PM (#29829281)
Well, correctly writing all the copy/move constructors is hard.
Re:“I am literally losing sleep” over Java (1996) by duped on Thursday January 06, 2022 @12:06PM (#29826227)
> It lets a lot of innovation happen in other languages

Only if you're defining innovation as syntax and semantics to the language. Java has been the pinnacle and cutting edge of language implementation innovation decades - Sun/Oracle is/was the Bell Labs of VM and JIT research.

Re:“I am literally losing sleep” over Java (1996) by mashpoe on Thursday January 06, 2022 @10:08AM (#29824423)
> It lets a lot of innovation happen in other languages, then takes the successful parts for itself

The only time I've ever had to use Java was for a computer science class, and I thought it was a solid language (pun intended), but I hated its half-assed attempt at operator overloading.

I think it's a major feature that's long overdue to be fully implemented in Java, because it's already used for some of Java's built-in classes and it's proven useful in many other programming languages.

Most of Java seems very well-thought-out to me, but for some reason they decided to add only some operator overloading, instead of planning ahead more.

I remember hearing somewhere that they were planning on adding operator overloading, but last I checked it didn't look like it was going anywhere.

Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @10:17AM (#29824544)
Java chose not to implement (general) operator overloading because it's really hard to do right. We're left with just a fluent syntax for appending text to strings.

Java was one of the first language specifications to be written by adults (maybe Common Lisp was the first, but it drives Common Lisp fans crazy to compare Common Lisp to Java, Python, etc.)

Python's operator overloading works remarkably well given that it has a very simple model (always look to the left hand side to decide how to interpret the operator.) C++ on the other hand ought to make anybody skeptical of the idea, but C++ would make anybody thoughtful and sensitive question the idea of computers entirely.

Re:“I am literally losing sleep” over Java (1996) by Someone on Thursday January 06, 2022 @10:47AM (#29825022)
> Java was one of the first language specifications to be written by adults (maybe Common Lisp was the first, but it drives Common Lisp fans crazy to compare Common Lisp to Java, Python, etc.)

I think ALGOL was first, in the ALGOL 60 Report (https://en.m.wikipedia.org/wiki/ALGOL_60#History). COBOL may have had a good spec around that time, too.

There were older languages with specifications, but those specifications were looser, with languages partly defined by their prime implementation.

Re:“I am literally losing sleep” over Java (1996) by tsimionescu on Thursday January 06, 2022 @11:20AM (#29825516)
Well, neither Java, Common Lisp nor ALGOL60 support operator overloading, so there does seem to be a trend there.

Common Lisp in fact, as most lisps, has no support for "operators" in the infix sense at all. If you have a need for a very algebra-heavy portion in your program (say, a linear algebra library), the best idea would be to define a DSL for that particular algebra - especially since this will give you much more control over efficient evaluation than using the built-in evaluation order.

A good example of the limitations of simplistic operator overloading is matrix algebra: A+B•C can be computed efficiently as a ternary operation, more efficiently than doing A+B then multiplying the result by C. Now of course, you can implement this in C++ by having operator+() return some kind of matrix_addition object, and then defining the efficient operations in operator*(matrix_addition, matrix) etc, but that is much more roundabout than defining a simple addAndMul(A,B,C), or an explicit optimizing DSL.

Re:“I am literally losing sleep” over Java (1996) by lispm on Thursday January 06, 2022 @11:45AM (#29825892)
There are reader macros which provide a more math-like notation. Those are translating the math syntax into Lisp s-expressions at read-time.
Re:“I am literally losing sleep” over Java (1996) by tsimionescu on Thursday January 06, 2022 @12:08PM (#29826257)
Yes, that's the DSL concept I was talking about.
Re:“I am literally losing sleep” over Java (1996) by nradov on Thursday January 06, 2022 @10:40AM (#29824900)
The lack of operator overloading makes it impossible to implement new numeric types in a consistent way. For example imaginary numbers or numbers with units.
Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @11:04AM (#29825272)
You can make the case that both intX (x=16, 32, 64) and floating point are bad for general purpose computing. Like Common LISP and Python, Java has bigints and rationals in the stdlib, but Java makes you use non-operator syntax to get at them. Contrast that to Clojure which puts them on your fingertips.

Java has always been in a strange place of not deciding if it wants to be a systems or application language. (The standard architecture is that demanding systems, say video games, are written in both a systems language and a scripting language. A Python coder feels smart when the incorporate, say, number is written in C or FORTRAN but Java’s xenophobia makes that feel like a personal failure. Java is ‘good enough’ for applications programming that you might find something like Spring or Guava gives you all the dynamism you need with less hassle than adding an embedded scripting language like Groovy or Clojure.)

Re:“I am literally losing sleep” over Java (1996) by hiptobecubic on Thursday January 06, 2022 @10:36AM (#29824848)
If there's no implementation on the left, python then looks on the right.
Re:“I am literally losing sleep” over Java (1996) by DerArzt on Thursday January 06, 2022 @10:13AM (#29824474)
If you are serious about using the JVM, I would suggest Kotlin or Scala as a better alternative to Java as they have all the libraries and greatness of the JVM but they have less of the historical baggage that Java brings with it.

Both can be written in a Java like fashion to start, and have 100% interop with Java (you can mix the languages in projects) so the learning curve is pretty alright.

Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @10:23AM (#29824638)
That is the frying pan to the fire.

JDK 17 has most of the good features of Scala and Kotlin.

Scala seems to be designed so that you can write a short book with very fluent and natural looking demos. Make a small deviation from that and there is nothing fluent or natural about it.

Kotlin is OK but isn't sufficiently better than Java to be worth using when any Kotlin dev is going to have to know Java and Java-Kotlin mapping pretty well to use libraries. (It's a similar problem to Typescript.)

Both Scala and Kotlin are sufficiently similiar to Java to provide no real benefit. I'd point to Clojure as a language that is radically different from Java AND that takes advantage of the strengths of the JVM to be worth the cognitive load of having to know both a new and old language to be productive.

Re:“I am literally losing sleep” over Java (1996) by fcurts on Thursday January 06, 2022 @03:43PM (#29829833)
> JDK 17 has most of the good features of Scala and Kotlin.

I keep reading on HN that "Kotlin isn't much better than Java X". Having used Java and Kotlin (mainly targeting JVM) full-time for 6 years, this doesn't match my experience at all.

Here are some of my favorite Kotlin improvements over Java that I leverage all the time:

* Much improved type system (nullable types, function types, declaration site variance, type aliases, contracts, better type inference, reified function type arguments)

* Local variables are final by default ("val")

* Type-level distinction between read-only and mutable collections (but compiled to Java collections under the hood, so no conversion required when interacting with Java)

* Much improved collection API

* Much improved lambdas (e.g., no pain points w/ mutating variables and checked exceptions)

* Extension functions (incredibly useful in practice)

* Much better DSL capabilities (great for UIs, generating HTML, etc.)

* Lazy properties (more generally: delegated properties)

* Coroutines (looking forward to Java's Loom; by then coroutines will have dramatically improved my async code for 5+ years)

* Great serialization support (kotlinx.serialization)

* Pragmatic macro-like capabilities via inline functions and compiler plugins (removes lots of boilerplate)

* Multiplatform support (JVM/JS/WASM/native; Graal native image is a good alternative to Kotlin/native and also works for Java)

Although I'm glad to see that Java is still improving, it will never get close to Kotlin. The most obvious reason is that many of Java's early design decisions were revised in Kotlin but are impossible or impractical to revise in Java. Also, Java carries the burden of being a platform language, whereas Kotlin can focus on being the best possible application language.

These days, I only use Java for libraries intended to be used from languages other than just Kotlin. In that case, I don't want to force Kotlin on users (stdlib dependency, debugging, etc.).

Re:“I am literally losing sleep” over Java (1996) by thomascgalvin on Thursday January 06, 2022 @10:48AM (#29825040)
> Kotlin is OK but isn't sufficiently better than Java to be worth using when any Kotlin dev is going to have to know Java and Java-Kotlin mapping pretty well to use libraries.

One of the big benefits of Kotlin is that if you know Java, you pretty much already know Kotlin, too. A good Java dev can get spun up on the basics in a day or two.

> Both Scala and Kotlin are sufficiently similiar to Java to provide no real benefit.

Kotlin provides a ton of ergonomic features that I absolutely adore. Named parameters and default parameter values alone save me tens or hundreds of lines of code.

I think of Kotlin as what would happen if a Java developer looked at Javascript and asked "okay, but what if this didn't suck?"

Re:“I am literally losing sleep” over Java (1996) by pionar on Thursday January 06, 2022 @12:49PM (#29826916)
> I think of Kotlin as what would happen if a Java developer looked at Javascript and asked "okay, but what if this didn't suck?"

I think you mean "what if we took C# and put it on the JVM"? /s

Honestly, C# has had most of the features Kotlin "adds on" to Java for years, even decades.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:27PM (#29828616)
Kotlin's future is tied to Android, on the JVM I don't even care it exists.
Re:“I am literally losing sleep” over Java (1996) by DerArzt on Tuesday January 11, 2022 @09:15AM (#29891650)
How so? While yes Android is one of the most common uses at the moment for Kotlin (thanks to Google making it a first class supported language for the platform) it is still dependent on the JVM, thus can do anything that Java Can.
Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @11:06AM (#29825316)
You can’t beat Javascript for ergonomic passing conventions and packing and unpacking of lists and dicts.
Re:“I am literally losing sleep” over Java (1996) by ebruchez on Thursday January 06, 2022 @03:15PM (#29829383)
> Both Scala and Kotlin are sufficiently similiar to Java to provide no real benefit

Sorry but "no real benefit" seems to come from a position of ignorance.

I can only talk about Scala which I know pretty well.

While Clojure is a radical departure from Java, being a Lisp, Scala is a departure thanks to its type system and features that help you writing more functional (as in functional programming) code. And I mean this in a good way: it helps you avoid mutations and side-effects, while giving you the freedom to use good old OOP if you wish so. In general it provides tools that help you better express your intent that Java doesn't have.

I think that Java has too much baggage to ever become as good as Scala, especially on the type system side, and, in addition, Scala is also moving forward.

Also don't forget Scala.js [1], which is rock-solid and just plain amazing, and Scala Native [2].

[1] https://www.scala-js.org/

[2] https://scala-native.readthedocs.io/en/latest/

Re:“I am literally losing sleep” over Java (1996) by joe_fishfish on Thursday January 06, 2022 @01:51PM (#29828032)
Honestly, the null safety and constructor initialisation of properties in Kotlin alone make it worth it.
Re:“I am literally losing sleep” over Java (1996) by sideeffffect on Thursday January 06, 2022 @02:00PM (#29828176)
> JDK 17 has most of the good features of Scala and Kotlin.

I'd be sooo happy if that were the case, but sadly, it's not. From the point of view of Scala, I still see many features missing. Roughly in the order of importance:

* Immutable persistent collections in the standard library (and thus lingua franca in the libraries). Just so much better than mutable collections. Way less headache. Once you start using them, you realize how rarely you actually need mutable ones.

* Pattern matching. Java will surely improve on what is currently available. But why wait? It may take a long time.

* Sophisticated string interpolation. It's powerful, and yet is still easy to read. Again, Java is on its way to get it, but with Scala you can have it right now.

* Type Classes. Sometimes it is very good design to separate data from functionality. Java designers (Brian Goetz IIRC) mention they would like to get this eventually. Scala has an interesting design of Type Classes -- "givens" -- which is also modular (in contrast to Haskell). Scala also has an elegant mechanism for Type Class derivation using the "derives" clause. https://docs.scala-lang.org/scala3/reference/contextual/deri...

* for-comprehension syntax and IO/Task/ZIO for async programming. Project Loom still hasn't delivered. But Scala has you covered. It gives you for-comprehension syntax, so that you don't have to suffer from nested callback hell. And there are many great libraries for async programming, like ZIO or Cats Effect. These are easier to work with, compared to other Futures from various Java libraries, because they're lazy, not eager. for-comprehension syntax is also useful for other things, it's just that async is the typical usecase.

Higher-kinded types. Not everything has to be super fancy higher-kinded type-level craziness. And very often one gets away without needing to use higher-kinded types and that's good (just as often a solution without parametric polymorphism aka generics is enough). But other times it's awesome to have this power of abstractions. Typically, but not only in libraries.

* Object. Sometimes you just need to have an object (which might implement an interface/class/trait). But Scala doesn't force you to create a whole class, if you only even want just one instance anyway. A small thing, but way more elegant.

But I'm really happy to see Java/JVM improve. The 17 release has brought some great features, but in the language level (records, embryonic pattern-matching, ...) and the VM level (GCs in particular). We all benefit more or less directly, one way or the other.

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @03:41PM (#29829788)
Also, Scala’s optional null checking (where null becomes a type that is not at the bottom of the type hierarchy) is really cool!

All in all, I do find using Scala can absolutely worth it, but I really don’t feel it with Kotlin. It feels like a watered down Scala, and add to that where modern Java currently is, I feel it is not needed.

Re:“I am literally losing sleep” over Java (1996) by smaudet on Thursday January 06, 2022 @12:21PM (#29826476)
Also Java doesn't run on android? Not 17 anyway...

I guess you could try to argue mobile is bad or something, but you get Kotlin not JDK on mobile.

Yes, Clojure is probably better, but on the flip side as a developer knowing Java 8 and Kotlin is better than knowing Clojure and JDK 17. Perhaps you can point to some salaries here but Java developers are not in short supply, if you wanted to play that game there are better languages for more lucrative payout (assuming you can even get them, these tend to be boutique shops not generally hiring publicly)

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:29PM (#29828647)
The fellowship of Kotlin at Mountain View will ensure that Android Java stays as it is, any further improvement might happen only if the community is very vocal about any Java library on Maven Central that fails to target Android.

However they will most likely assign an intern to port it to Kotlin than improve Java's support on Android.

Re:“I am literally losing sleep” over Java (1996) by vips7L on Thursday January 06, 2022 @10:32AM (#29824797)
Scala has just as much historical baggage imo. It's community is split between functional zealots and "better java". You also have the Scala 2/3 split that is currently going on and just the general complexity of the language makes it not so appealing.

IMO if you're serious about using the JVM you should be using Java 17 and following the latest version. Kotlin is usable, but it doesn't bring that much more to that table other than longer compile times.

Re:“I am literally losing sleep” over Java (1996) by eeperson on Thursday January 06, 2022 @12:38PM (#29826717)
Why do you feel that Scala has just as much historical baggage? Isn't the whole point of the Scala 2/3 split to remove historical baggage.
Re:“I am literally losing sleep” over Java (1996) by DerArzt on Thursday January 06, 2022 @03:13PM (#29829337)
The community split is what makes Scala better in my opinion. The fact that you can have the split between functional first and better java people is a nice thing to see over Java where if you want to do functional programming, you are a second class citizen.
Re:“I am literally losing sleep” over Java (1996) by daltont on Thursday January 06, 2022 @01:24PM (#29827594)
I was really into Scala ten years ago, but felt that a "Scala--" might be more accessible to most devs and hurt Scala adoption. Lo and behold, we got Kotlin.
Re:“I am literally losing sleep” over Java (1996) by smaudet on Thursday January 06, 2022 @12:28PM (#29826569)
But isn't the great thing about using the JVM supposed to be not using Java?

Or at least the perf advantages it brings. Java has nice stuff today maybe but one could argue that it is primarily defending market share that caused Oracle to move forward with its language updates.

I'm inclined to say the opposite, the more the JVM stays healthy and the stronger the third party ecosystem the more likely it doesn't become a 'dead' language like COBOL or FORTAN (not dead but in terms of marketshare).

Re:“I am literally losing sleep” over Java (1996) by darksaints on Thursday January 06, 2022 @10:37AM (#29824865)
They may have a little less of the historical baggage, but that's still a lot of baggage. Same goes for F#. It's a shame that three of the best programming languages in existence are built on top of Java and C#, instead of doing their own thing. Admittedly their VMs are mostly fantastic, but trying to reuse libraries and language constructs has just created more problems.
Re:“I am literally losing sleep” over Java (1996) by pulse7 on Thursday January 06, 2022 @12:42PM (#29826805)
Some say "historical baggage", others say "backwards compatibility"... two sides of the same coin...
Re:“I am literally losing sleep” over Java (1996) by pkulak on Thursday January 06, 2022 @10:55AM (#29825145)
And lets not forget that the JVM runs all kinds of things that aren't Java. So Java devs who get bored can write a few packages in whatever new hotness they like until either they're sated, Java catches up, or all new development moves over.
Re:“I am literally losing sleep” over Java (1996) by exabrial on Thursday January 06, 2022 @11:21AM (#29825526)
Whats the productivity coefficient for Java? Or Javascript? Or Python? or Ruby? Or Assembly? or C?

I only ask because I've never gotten a straight answer with an actual number.

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @12:39PM (#29826736)
Because there is no way to define such a number. We only “know” as per Brook’s famous paper, No silver bullets that this number has not passed a cumulative value of 10 in like 3 decades now, since the first programming languages. The only way to increase productivity is through code reuse - and given the flourishing JVM ecosystem, Java has that as a big plus.
Re:“I am literally losing sleep” over Java (1996) by gtm1260 on Thursday January 06, 2022 @10:53AM (#29825122)
One of the biggest turn off to me of java has always been the poor quality of many java apps. Especially on mac, you know when its a java app vs native.
Re:“I am literally losing sleep” over Java (1996) by pkulak on Thursday January 06, 2022 @10:59AM (#29825195)
Can you give me an example? Java is used for so few user applications, the only project I can think of is IntelliJ, which is an amazing project.
Re:“I am literally losing sleep” over Java (1996) by garbagecoder on Thursday January 06, 2022 @01:36PM (#29827788)
I use jetbrains apps on mac. I like them a lot, but they aren’t mac-like even now. In the past they were even chunkier.

SPSS comes to mind too.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:34PM (#29828710)
SPSS doesn't come to mind as having developers that would bother to read Filthy Rich Clients kind of books, or Apple extensions,

http://filthyrichclients.org/

https://developer.apple.com/library/archive/navigation/index...

Re:“I am literally losing sleep” over Java (1996) by gtm1260 on Thursday January 06, 2022 @04:01PM (#29830091)
My mind goes to the original Arduino IDE, or Weka Studio. I know these are pretty indie projects in the scheme of things, but still.
Re:“I am literally losing sleep” over Java (1996) by strangemonad on Thursday January 06, 2022 @09:01AM (#29823586)
And when you leave aside Java (the language) and consider the jvm platform broader ecosystem with all the various interoperable languages like kotlin, scala, clojure… it’s a huge space.

I understand some level of heathy criticism but, I don’t really understand the level of hate the jvm gets.

When you look at recent and upcoming features, a lot of the complaints about it being “heavy” are being directly addressed.

Re:“I am literally losing sleep” over Java (1996) by foobarian on Thursday January 06, 2022 @09:53AM (#29824218)
On the Internet nobody knows you are a dog.

There is a wide spectrum of age, experience, and attitude in the programming population. Hot take: I am guessing that a lot of the noisy hating and hemming and hawing comes from the newer, less experienced cohort, we just can't tell on the Internet and so the perception skews that a significant fraction of all programmers think this way. I am basing this on having been there, done that, where I would scoff with indignation at any software not written in hand-optimized assembler with a bunch of unnecessary (to my newbie self) layers of abstraction.

Re:“I am literally losing sleep” over Java (1996) by ethbr0 on Thursday January 06, 2022 @10:19AM (#29824570)
Reason Java gets so much hate: It's never cool to be an advocate for the old, warted, battle-tested, reliable, supported option.

And everybody wants to be cool.

It's the Toyota A series or Volvo B18 of programming languages.

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:35PM (#29828735)
Re:“I am literally losing sleep” over Java (1996) by bayindirh on Thursday January 06, 2022 @09:15AM (#29823754)
JVM is not really that heavy since the Intel released "Core i" series processors. Also, JVM uses its resources well. It's one of the best engineered software artifacts if you ask me.

I really enjoyed using the language back then, and will not hesitate to restart if there's a scenario which would fit the bill to use it.

Re:“I am literally losing sleep” over Java (1996) by garbagecoder on Thursday January 06, 2022 @01:39PM (#29827841)
I really dislike Java but I like the JVM and am a big fan of clojure. I don’t trust/like Oracle, and maybe it’s just confirmation bias, but I hear much more along these lines than people who just dislike the jvm.
Re:“I am literally losing sleep” over Java (1996) by smaudet on Thursday January 06, 2022 @09:28AM (#29823890)
It's not heavy, it's the syndrome where wild success gets you associated with the good and the bad.

Enterprise Java is extremely slow, over-engineered, complex, that's where the majority of hate comes from. Then they had their security debacle, coupled with a couple strange roadmap changes, and being bought out by Oracle, an unpopular company for different reasons.

Java the language then sat mired by the corporate world and went nowhere for almost a decade (java 6, 7, 8).

Oh, and don't forget Billy, wonder why C# has made such a comeback in recent years. It's a nice(r) more modern language, it's not that great, come on...and I say this currently working in it full time.

So yeah political prop and the normal stuff popularity brings with it. It has also happened to JS too...

Re:“I am literally losing sleep” over Java (1996) by mrcwinn on Thursday January 06, 2022 @10:42AM (#29824923)
>I do not only think he was right to lose sleep over it: I think Java delivered.

He's not losing sleep over Java, the language, becoming popular. He's losing sleep over the threat to the business (at the time, operating systems). I think if you consider Microsoft's market cap ($2.39 trillion this morning), despite some bumps along the way, Microsoft protected and grew its value.

It's not to say Java hasn't enabled monetization. But if you have "billions of Java smartcards" and the long tail of those installs don't create much value or affect Microsoft's bottom line, then, to Bill, that particular point is moot.

(Edited typo)

Re:“I am literally losing sleep” over Java (1996) by xtracto on Thursday January 06, 2022 @11:16AM (#29825449)
I think Gates didn't have anything to worry about regarding Java... at the end of the day, the company that created it went under the water in 2009. Java as a technology was great, but as a business just didn't cut it.
Re:“I am literally losing sleep” over Java (1996) by ThrowawayR2 on Thursday January 06, 2022 @12:21PM (#29826473)
Nobody knew that at the time. 2000 is the peak for both for companies before the dotcom bust and Sun Microsystems had $18.3 billion in revenue, not that far behind Microsoft's $22.9 billion in revenue.
Re:“I am literally losing sleep” over Java (1996) by garbagecoder on Thursday January 06, 2022 @01:40PM (#29827859)
And wasn’t part of that that MS made it’s own implementation? One that I recall being preferable as a user.
Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @10:26AM (#29824708)
I had a summer job programming Java when it was still in beta.

I remember getting into an argument in the men's room of the basement of center Ithaca with two guys who were saying that Java was overhyped and I was saying "believe the hype"

That time I was right.

Java was one of the first programming languages to be specified by adults. (e.g. they didn't know how to specify PL/I and make it work, C worked by accident, ...) When researchers realized the memory model was broken the first instinct of the Java creators was "let's fix it" while other languages first made excuses and waited a decade + for a "fix"

Re:“I am literally losing sleep” over Java (1996) by otabdeveloper4 on Thursday January 06, 2022 @12:48PM (#29826911)
The original promise of Java was cross-platform user-facing visual apps. (Which is why Gates was scared of it.) This promise certainly failed to deliver.

Instead Java is now Cobol 2.0, but nobody lost sleep over this fact.

Re:“I am literally losing sleep” over Java (1996) by PaulHoule on Thursday January 06, 2022 @01:10PM (#29827327)
There was the idea that Java Beans would work like the COM model does for Visual Basic and it would be straightforward to build a GUI to build form GUIs.

That never happened, but few visual UI builders have come close to what Visual Basic was in 1995.

I liked JavaFX but I don't miss it.

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @09:04AM (#29823639)
Java would be the same success as PHP .. it might be everywhere but due to all kinds of side forces.

It's like playing snooker, claiming a ball, missing it but scoring all the other ones accidentally and bragging.

Re:“I am literally losing sleep” over Java (1996) by Sharlin on Thursday January 06, 2022 @09:28AM (#29823888)
That's very unfair. Some people may dislike Java and its ecosystem (and even the JVM platform), but it is not where it is now by accident.
Re:“I am literally losing sleep” over Java (1996) by LanceH on Thursday January 06, 2022 @10:25AM (#29824691)
But it isn't necessarily there strictly on the merits of the language. Sun put a billion dollars of marketing into it. Managers, directors and others with expectation of ever programming were taking Java courses because it was going to change everything.

It was going to run on every device in my kitchen, and they were all going to talk to each other. Instead the first niche it found was J2EE, and that "write once, run anywhere" was a bit comical, because who swaps out the OS on their server?

It was apparently good enough to be the choice for Android and similar, but that was much later.

It's really difficult to describe how people -- especially non programmers -- bought into the hype surrounding Java.

I've since seen a bit of that hype around some things, but never to that extent: XML, SPA, a strange obsession with tiled widgets.

Re:“I am literally losing sleep” over Java (1996) by pbourke on Thursday January 06, 2022 @12:25PM (#29826517)
> It was going to run on every device in my kitchen, and they were all going to talk to each other. Instead the first niche it found was J2EE

The first niche was applets. A managed language with a batteries-included library, familiar syntax and cross-platform GUI story was a new thing at the time.

Re:“I am literally losing sleep” over Java (1996) by KptMarchewa on Thursday January 06, 2022 @02:03PM (#29828231)
3 billion devices run log4shell.
Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @09:55AM (#29824248)
I honestly wonder what made java so prevalent server side. JVM jit speed and memory safety are good arguments but the rest was not so shiny. Remember the J2EE era, it was horrible and the reason java got there seems, IMO, to be heavy marketing.

ps: I forgot, the JVM spec was a good thing, it made a lot of things sound for people, so easier deployments and less inconsistencies.

Re:“I am literally losing sleep” over Java (1996) by Jetrel on Thursday January 06, 2022 @11:17AM (#29825467)
Not exactly a java fan here, but java targeted the enormous block of people writing in C/C++ for their enterprise servers, and gave them "machine-independence". Being able to upgrade your server, and not having to rewrite your app, was huge. The competition wasn't PHP, at the time; it was C/C++.

It's interesting in today's era of Rust, that people think of Java as failing to replace C++; in practice, it was only 90% successful, and managed to replace the vast majority of cases where people did use it.

About the only things that didn't get replaced were (some) desktop gui apps, and apps that were so tiny that they weren't worth the launch of the JVM.

Re:“I am literally losing sleep” over Java (1996) by zmmmmm on Thursday January 06, 2022 @05:10PM (#29831056)
Also - you have to remember that in the late 90's / early 2000's, Windows was at peak dominance, nearly 100% of developers at work were stuck with a Windows desktop to develop on. At the same time nearly all servers were linux or maybe solaris. So how are you going to develop on Windows and deploy on Unix? C++ was a nightmare, scripting languages were far from ready ... Java was really transformational in how it gave a complete, totally portable standard library in a mature language framework. All these things are take for granted today.
Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @12:02PM (#29826167)
Yeah I remember steele saying they wanted to make c++ move toward lisp.

But you got me curious.. what kind of backend code was written in c++ ? did people write server side logic in it ? I remember seeing some Oracle C code but it felt like a strange thing and not a c/c++ land. But to be honest that's not my world.

Re:“I am literally losing sleep” over Java (1996) by pbourke on Thursday January 06, 2022 @12:31PM (#29826620)
C++ was quite common back in the day. Amazon began as a C++ monolith (obidos).
Re:“I am literally losing sleep” over Java (1996) by KptMarchewa on Thursday January 06, 2022 @02:05PM (#29828260)
I honestly feel there was no competition in the early 00s besides PHP, and that choice came with tons of other issues, especially at that time.
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @10:38AM (#29824878)
PHP was a scripting language that got big because my aunt could create a “website” with it and host it for pennies. If anything, its popularity was the only surprising thing.

The JVM on the other hand was not chosen by Google, Apple, Alibaba and basically the majority of web servers to be the base stone of their functionality by accident.

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @10:50AM (#29825068)
But the server side position of java is already a strange notion of success, as mentioned above java wasn't meant to live there. Hence the parallel with PHP, its mod_php was the reason admins installed it on servers, because it was easier and leaner (compared to mod_perl), a happy accident.
Re:“I am literally losing sleep” over Java (1996) by wanderingstan on Thursday January 06, 2022 @11:01AM (#29825229)
Indeed. Reminds me of an early 1997 interview I had about the future of Java, when it was trying hard to displace JavaScript in the browser (swing gui and such) and flash was already starting to beat it out. https://wanderingstan.com/netguide-interview-february-1997
Re:“I am literally losing sleep” over Java (1996) by jfengel on Thursday January 06, 2022 @02:24PM (#29828572)
I still wonder what would have happened if Java decided to take Javascript's approach by giving access to the DOM, rather than an entirely separate GUI mode.

Things like Google Maps and Gmail came as something of a shock. They were near-desktop-level apps entirely within the browser. That meant JS, not because of the language but because it was the only cross-platform system that gave access. It should have been possible to do that for Java as well, but they never really tried.

Re:“I am literally losing sleep” over Java (1996) by simion314 on Thursday January 06, 2022 @09:28AM (#29823898)
>Java would be the same success as PHP .. it might be everywhere but due to all kinds of side forces.

People like you that complain about C,PHP,Java etc forget the history , your favorite cool language did not exist at that time or if it existed had probably a lot of downsides. Also many complainers do not work with the languages and repeat like parrots something they read. I would love to get some perfect programming language, something with more maths in it that forces thinking of solutions and less glueing shit together or rewriting X and CoolLang for my CV.

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @09:53AM (#29824207)
And what is that history I have forgotten ?

Was java an embedded project at first ? yes

Was it then a client side universal solution ? yes

is it still any of those two ? no

Also please don't make comments on me assuming I'm parroting, that would be nice :)

Re:“I am literally losing sleep” over Java (1996) by whimsicalism on Thursday January 06, 2022 @10:00AM (#29824303)
> Was it then a client side universal solution ? yes

This remains true?

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @10:48AM (#29825039)
I rarely run into client side programs being better (or even interesting) due to java/jvm. Eclipse was quite a clusterf.. (at least when I left that side in 2008). Note that I'm not anti Java. I just think its course was fluctuating across time and "success" is really a strange term. The rare times people were happy about Java was the advanced JIT.
Re:“I am literally losing sleep” over Java (1996) by simion314 on Thursday January 06, 2022 @11:22AM (#29825551)
Minecraft Java Edition IMO has this giant community because it is easy to mod and this is because of Java since the devs did not create modding tools. I am sure it was much easy for one person to develop such a complex game in a manged language too , from my experience with desktop apps the ones I made in Adobe AIR using AS3 had a lot fewer bugs and fewer support tickets and we got cross platform too.

I also worked on a Java screen sharing in browser web conference solution back when this was not possible with native stuff or with Flash, if you understood the language you could get good performance.

Re:“I am literally losing sleep” over Java (1996) by whimsicalism on Thursday January 06, 2022 @11:12AM (#29825388)
IntelliJ/Pycharm?
Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @11:58AM (#29826085)
IntelliJ might be better than Eclipse/Netbeans but it's still not the massive success Java planned. A few exception in the IT side of the world.
Re:“I am literally losing sleep” over Java (1996) by simion314 on Thursday January 06, 2022 @01:28PM (#29827666)
>IntelliJ might be better than Eclipse/Netbeans

Is better then any other similarly featured IDE, so good that people pay for it rather then use free alternatives

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @01:53PM (#29828061)
I know I used it for ages back when they started MPS
Re:“I am literally losing sleep” over Java (1996) by simion314 on Thursday January 06, 2022 @10:46AM (#29824995)
>Also please don't make comments on me assuming I'm parroting, that would be nice :)

I did not said you specifically but I doubt you have years of experience in PHP and Java but let me know How what was the better alternative back then? Writing webpackes in C or some proprietary language with a paid compiler? Was there something much better and for some reason people used PHp because was cool and were tons of "write in PHP zelots"?

From my memory the LAMP stack was free and was easy to start with, Java was much more productive then the alternatives and it had good tools, books and documentation. I can't think at any good alternative except the late C# but Microsoft was to incompetent to do the right thing and kept it proprietary and Windows only for a long time.

Re:“I am literally losing sleep” over Java (1996) by agumonkey on Thursday January 06, 2022 @10:54AM (#29825134)
I don't think the word productive ever reached my brain when I was learning websphere. Annotation driven servlets never felt exciting or clean (unlike the post closure / decorator era where you can write stuff clearly and rapidly). I'm calling for a winner language here, I'm saying praising java position is a strange notion of success, it's everywhere indeed, but for what reasons ?
Re:“I am literally losing sleep” over Java (1996) by simion314 on Thursday January 06, 2022 @11:17AM (#29825466)
> don't think the word productive ever reached my brain when I was learning websphere.

So what else was more productive? you said PHP is not the answer and "websphere" is not Java the language or Java the ecosystem (think of the many Java libraries out there and at the good enough Java standard library compared to others)

Re:“I am literally losing sleep” over Java (1996) by open-source-ux on Thursday January 06, 2022 @01:53PM (#29828068)
"How is Java not one of the biggest success story ever for a programming language?"

The language is an enormous success. But in one key area it did not succeed in popularity: in building cross-platform desktop GUI apps.

Many businesses did use it for building internal GUI desktop apps. However, Java did not find much success in consumer-facing desktop apps - despite the considerable effort made to encourage developers use Java for this purpose. For example, in the late 1990s Java had it's own GUI look-and-feel called 'Flush 3D'. It was designed to be consistent across operating systems.[1]

But Java desktop apps earned the reputation as being slow and unresponsive, not fast and nimble. The Java applets that ran in the browser were no better. Today, perhaps Java will find success creating consumer-facing, high-performance applications on web pages using WebAssembly?

[1] http://ptitben2000.chez.com/info/lookandfeel/higc.htm

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:41PM (#29828805)
Re:“I am literally losing sleep” over Java (1996) by copperx on Thursday January 06, 2022 @02:06PM (#29828284)
I remember thinking Flush 3D looked cool. Especially when running on Solaris.
Re:“I am literally losing sleep” over Java (1996) by dec0dedab0de on Thursday January 06, 2022 @09:59AM (#29824290)
I think much of the hate for java came from non-programmers, or future programmers who had to deal with runtime issues. For a long time if an app was written in Java it meant it was going to be a pain at some point.
Re:“I am literally losing sleep” over Java (1996) by vintermann on Thursday January 06, 2022 @11:57AM (#29826075)
I'd say it runs distant descendants of Java. The fact that Gates lost sleep not only over Java, but over JavaBeans is undeniably funny. JavaBeans delivered frustration and secure employment for a legion of developers.

Just a couple of weeks ago we got a reminder of how horrible early Enterprise Java was, with the Log4j exploit. The kind of thing everyone goes, "why would they think that was a good idea?" today, but the answer then was "almost everyone, certainly everyone who makes decisions..."

Re:“I am literally losing sleep” over Java (1996) by joelthelion on Thursday January 06, 2022 @08:57AM (#29823541)
Java didn't kill Microsoft though.
Re:“I am literally losing sleep” over Java (1996) by forgetfulness on Thursday January 06, 2022 @09:08AM (#29823677)
In a very indirect way; leveraging its popularity, and coming on the heels of Apple to create a captive audience for their ad networks and surveillance machinery, Google used Java to spring up a developer base for Android, which ate away at the use of MS product outside of the US like iOS did stateside.
Re:“I am literally losing sleep” over Java (1996) by tonyedgecombe on Thursday January 06, 2022 @09:00AM (#29823584)
No but it did a pretty good job of finishing off COBOL.
Re:“I am literally losing sleep” over Java (1996) by sgt on Thursday January 06, 2022 @09:48AM (#29824141)
There's certainly less COBOL, but finished off? Most banks run the most critical code on COBOL and new programs are being written all the time.
Re:“I am literally losing sleep” over Java (1996) by garbagecoder on Thursday January 06, 2022 @01:53PM (#29828062)
I’m COBOL “certified” for whatever iota that’s worth. I don’t think I would say “all the time.” There are legacy systems that are being ported to JVM that remain in COBOL because it “just werx” especially for batch processing.

But I have no experience in banks, but in the military and government. So maybe I’m wrong about what they’re doing, but in my experience it was either all being moved to Java or at least JVM just because some of the physical hardware was getting too old to maintain.

I actually think a lot of the new C-family “modern” languages could learn a couple of things from COBOL. It really makes you be explicit about data.

Re:“I am literally losing sleep” over Java (1996) by tonyedgecombe on Thursday January 06, 2022 @12:11PM (#29826301)
I’d love to see some evidence because my guess is there is an order of magnitude more Java code in banks than COBOL.
Re:“I am literally losing sleep” over Java (1996) by sgt on Thursday January 06, 2022 @01:50PM (#29828024)
Yeah, of course there is. The banks write a lot of code and it's wrapping the crucial COBOL core in various ways.

There's no reason at all to write those parts in COBOL. Banks use primarily Java and C# for that, and it's much easier in terms of recruitment.

Re:“I am literally losing sleep” over Java (1996) by the-dude on Thursday January 06, 2022 @08:57AM (#29823548)
Only because they invented their own.
Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @09:37AM (#29824005)
And now they have come around, have bought jClarity and are an OpenJDK contributor with their own distribution.
Re:“I am literally losing sleep” over Java (1996) by cfcosta on Thursday January 06, 2022 @09:04AM (#29823629)
Because Sun (or oracle, I'm bad with time) decided to forbid MS to keep developing their own implementation.
Re:“I am literally losing sleep” over Java (1996) by dtech on Thursday January 06, 2022 @09:08AM (#29823670)
Rightly so. They added all kinds of things that only worked on the MS JVM, which was the "extend" of their EEE strategy, right before extinguish.
Re:“I am literally losing sleep” over Java (1996) by tzs on Thursday January 06, 2022 @09:41AM (#29824048)
Those things were almost all things that you could ignore if you weren't trying to specifically make a program for Windows, and that if you were trying to make a program specifically for Windows made it a lot easier and made the resulting program a lot better as a Windows program.

If Sun had blessed Microsoft's approach and encouraged Apple to do similar for Mac and done similar themselves for Solaris and encouraged someone to do similar for Linux then Java could have become a major language for mainstream desktop applications rivaling C/C++ or perhaps even becoming the most common language for such development.

But Sun didn't want you to be able to write for Windows or Mac or Linux using Java. They wanted you to write for the Java platform which happened to run on Windows and Mac and Linux.

And so Java desktop apps were almost always inferior to desktop apps written in C/C++/Objective C that could make better use of the native GUI and other facilities and did not stand out as some weird ugly alien thing.

Re:“I am literally losing sleep” over Java (1996) by dtech on Thursday January 06, 2022 @09:50AM (#29824169)
They altered things in the java.* namespace [1], making it easy for developers to make things incompatible, as well as leaving out support for cross-platform enabling stuff like JNI and RMI. I can't read those actions as in good faith.

[1] https://www.infoworld.com/article/2077055/what-does-sun-s-la...

Re:“I am literally losing sleep” over Java (1996) by treeman79 on Thursday January 06, 2022 @09:24AM (#29823839)
J++ was the final straw for me. I realized it’s sole purpose was to screw over Java. Not to be useful. Spent last 20 years avoiding Microsoft tech after that.
Re:“I am literally losing sleep” over Java (1996) by copperx on Thursday January 06, 2022 @02:04PM (#29828241)
The cool thing about MS's JVM is that it made Java GUIs look exactly like native Windows Apps. I remember thinking it was a fantastic idea.
Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @09:41AM (#29824053)
Unfortunely the new generation seems not to have any issue with Android Java being Google's J++.
Re:“I am literally losing sleep” over Java (1996) by sangnoir on Thursday January 06, 2022 @01:33PM (#29827736)
> Unfortunely the new generation seems not to have any issue with Android Java being Google's J++.

Perhaps that's because it is not? Google aren't adding packages to the java.* namespace, and the language is 100% compatible with Oracle's compiler. Only the bytecode format and runtime are different, but that's no worse than how J2ME was, with SonyEricsson/Samsung/$OEM having their own custom packages (which Sun/Oracle approved of.)

edit: preempting another argument: limiting support to an old version of software/language spec is not a crime, though I'd be happy if Apple could be compelled to update the GPL software they bundle to the latest version (:

Re:“I am literally losing sleep” over Java (1996) by pjmlp on Thursday January 06, 2022 @02:15PM (#29828433)
> Google aren't adding packages to the java.* namespace, and the language is 100% compatible with Oracle's compiler.

It just shows how little experience you have porting anything beyond Java 7 into Android Java.

> Only the bytecode format and runtime are different, but that's no worse than how J2ME was, with SonyEricsson/Samsung/$OEM having their own custom packages (which Sun/Oracle approved of.)

Yet that is the whole sales pitch of Android that it isn't as fragmented as J2ME was.

Also you missed the part of SavaJe OS being on the path for making SE available on mobile and Java 8 introduced Embedded Compact Profiles, whose APIs aren't fully available on Android to this day.

They lie to the public that they use OpenJDK, when the truth mirrored on Gerrit code reviews is that they cherry pick features, tracking down which Android version supports what from Standard Java is a painful detective work.

To add to it, the fellowship of Kotlin cleverly misuses their broken Android Java to sell Kotlin features, instead of comparing it with the real deal.

Re:“I am literally losing sleep” over Java (1996) by iso1631 on Thursday January 06, 2022 @01:45PM (#29827933)
Microsoft J++?
Re:“I am literally losing sleep” over Java (1996) by smcl on Thursday January 06, 2022 @03:05PM (#29829216)
None of those are wrong but I think they're missing the point slightly. Bill Gates seemed concerned that Java represented either some existential threat to MS or at least something that would heavily dent their bottom line and pierce their dominance of the desktop market. And really it turned out to neither. Java is indeed very popular and undeniably a successful language + ecosystem, but I don't think what it has become was what Gates had feared.

I'd be interested to see if, knowing how it all played out, Bill Gates now believes he was right to be fretting about Java back then. Given the position Microsoft is in today, maintaining its hold on the desktop with Windows and with a strong cloud offering in Azure, I think he'd answer "no, I wasn't".

Re:“I am literally losing sleep” over Java (1996) by lliamander on Thursday January 06, 2022 @02:21PM (#29828538)
> I'd also add: it's kinda funny to see so many programmers hating on Java and thinking that, somehow, Java is dead or dying, yet on a daily basis they'll use one of the JetBrains tools, written in Java, to work on their "non Java" code.

And even JetBrains is working on a language to replace Java (which yes, runs on the JVM, but it also runs not on the JVM).

Java is a fine language, and one that I have the most experience with. I'm glad it's there, but I also think that increasingly it will not be the default choice for greenfield projects. That is typically what people mean by a dying language: it's only used for projects in maintenance mode.

Re:“I am literally losing sleep” over Java (1996) by samus on Thursday January 06, 2022 @10:29AM (#29824748)
It actually failed at what Bill Gates feared it would to: it is pervasive, but not a competition to Windows and the Windows GUI stack. Smartcards were never MS's target market, and nobody was yet thinking about smartphones.
Re:“I am literally losing sleep” over Java (1996) by Someone on Thursday January 06, 2022 @10:59AM (#29825194)
> Smartcards were never MS's target market

https://techmonitor.ai/technology/microsoft_to_slash_smart_c...: “Microsoft Corp has plunged into the smart card market with an operating systems that will compete with existing systems such as MultOS and Java Card

[…]

Microsoft’s Smart Cards for Windows is an 8-bit operating system with 8K of ROM”

That was October 1998. About a year later, there was https://news.microsoft.com/1999/11/15/microsoft-delivers-win...

I don’t think that went far, but they certainly tried.

Re:“I am literally losing sleep” over Java (1996) by samus on Thursday January 06, 2022 @11:54AM (#29826032)
Entering existing markets is not easy at all if the newcomers don't have significant advantages.
Re:“I am literally losing sleep” over Java (1996) by fundad on Thursday January 06, 2022 @10:49AM (#29825044)
The move to server-based experiences made the Mac competitive and made iOS wildly useful despite not bundling jvm.

I think what most helped it was that it was the common language against early commercially-supported app servers from big vendors.

BSD started as a Pascal compiler for Unix and enabled a community of researchers to work with a common language on machines more accessible than those from DEC.

Bill was right that consumer-oriented products with server-side software had Java as the wind at their backs.

Re:“I am literally losing sleep” over Java (1996) by samus on Thursday January 06, 2022 @11:59AM (#29826104)
Exactly, it was the Web that threatened Microsoft. But Java is not the only player that could have dominated in the backend. Also, the backend lost its importance to the frontend, where the HTML/JavaScript/CSS (both in the browser and as Electron) stack rules.
Re:“I am literally losing sleep” over Java (1996) by retro64 on Thursday January 06, 2022 @12:22PM (#29826480)
"...thinking about smartphones."

Actually, people were, even the non-technical everyday Joe. I remember a sales guy commenting once at a beginning of a meeting as he pulled out his PDA and set his oversized cell on the table "I'm just waiting for the day they combine these together so I only have to carry one of these". I think this would have been 1998 or 99, but people talked about "PDA phones" for quite some time before the iPhone appeared on the scene. The technology just wasn't there, and the CE based PDAs were clunky, nearly useless.

Re:“I am literally losing sleep” over Java (1996) by samus on Thursday January 06, 2022 @04:25PM (#29830439)
True. I also forgot about Java ME...
Re:“I am literally losing sleep” over Java (1996) by Mikeb85 on Thursday January 06, 2022 @12:15PM (#29826362)
Except Java never truly threatened the Windows OS. Nathan's reply back was on point: Java expanded into some voids but didn't kill Windows.

Android beat Windows mobile because MS pissed away their advantage (they had a mobile OS before either Android or iOS but it sucked) and Windows mobile was too little, too late. Nothing to do with Java really.

Re:“I am literally losing sleep” over Java (1996) by matchagaucho on Thursday January 06, 2022 @01:22PM (#29827553)
All true. Gates was specifically losing sleep over Java on the Windows desktop, which never really took off.
Re:“I am literally losing sleep” over Java (1996) by nudpiedo on Thursday January 06, 2022 @09:43AM (#29824081)
Well in the context of the emails: no, Java failed at delivering.

Solaris OS is now history and many programming language competitors raised and won over it at its own game in all areas but android, although it was an industry leader for quite long time its time is over and now it is mainly corporative legacy.

Even as general programming language Python and JavaScript took over, and in dedicated areas like webservers it’s been long since Java’s time is gone. The analysis in the replies is correct.

Re:“I am literally losing sleep” over Java (1996) by pritambarhate on Thursday January 06, 2022 @10:35AM (#29824829)
> Even as general programming language Python and JavaScript took over, and in dedicated areas like webservers it’s been long since Java’s time is gone.

I don't think this is true. Yes in the US in the startups Python, RoR and JS are more popular but in the enterprise Java (and .Net to some extent) still rules. In India right now the demand for Java programmers is sky high. Salaries for Java programmers have increased by 100% or more in the past 6 months or so. Actually overall salaries for programmers have increased a lot in India in the past 6 months due to very high outsourcing demand but Java is in especially high demand.

Note: I am in the outsourcing industry since past 12 years.

Re:“I am literally losing sleep” over Java (1996) by nudpiedo on Thursday January 06, 2022 @03:29PM (#29829590)
I’ve been part of companies which decide to outsource and very often what they send to India is the legacy code no one wants in research labs or headquarters, so it makes all sense to me.
Re:“I am literally losing sleep” over Java (1996) by numbsafari on Thursday January 06, 2022 @10:17AM (#29824538)
I think you hit the nail on the head.

Yes, Java is successful, both as a language and as a runtime. Obviously. You can't argue with billions of Android phones. Or the (possible?) news that FB has already given up and will be simply using Android for Meta.

I don't think a lot of folks here were around at the time to remember that a lot of the early hype around Java and the Web were both about unseating Microsoft.

Microsoft has thrived.

Sun is in the dustbin of history. Yes, mountains of cool tech came out of Sun, but as a company, as a existential threat to MS? Java didn't deliver.

That's not to say it couldn't have, had Sun managed it differently. But if Sun had managed it differently, it probably wouldn't have been the success that it is as a technology.

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @10:43AM (#29824953)
Just a note but android doesn’t run javaTM, especially not in a runtime. It compiles Google’s decade old java version AOT and native code gets executed on mobile phones.
Re:“I am literally losing sleep” over Java (1996) by fundad on Thursday January 06, 2022 @11:52AM (#29826012)
Until iPhone, Java on Linux was the standard for smartphones. Was that Java Micro editon? I think the handset makers actually licensed Java/JDK/JVM, not sure it cost money or control or what.

Without cloning the language, Alphabet would never have been able to standardize non-Apple phones under one advertising platform.

Re:“I am literally losing sleep” over Java (1996) by whimsicalism on Thursday January 06, 2022 @09:52AM (#29824194)
For very complex business logic backend/middleware, who is beating Java?

Only contenders I can think of are C# or Go.

Re:“I am literally losing sleep” over Java (1996) by jpgvm on Thursday January 06, 2022 @10:23AM (#29824651)
C# isn't, it's highly successful but locked into one ecosystem. .NET Core is very new (by enterprise standards) and hasn't yet had time to supplant usecases for Java.

Go is even newer and even less successful vs Java.

Firstly it's awful in large business logic heavy programs. It's getting better with generics but it's error handling and module structure mean it's very ill-suited to the sort of software Java thrives in.

I think the only real competitor to Java (both on Android and backend/desktop) is Kotlin.

Re:“I am literally losing sleep” over Java (1996) by vel0city on Thursday January 06, 2022 @11:54AM (#29826034)
FWIW, there is no ".NET Core" anymore. Now its all just ".NET", whether or not you're running it on Windows or Linux. Theoretically its all just the same from the application's perspective, there's no separate toolchain or library.
Re:“I am literally losing sleep” over Java (1996) by jpgvm on Thursday January 06, 2022 @07:18PM (#29832755)
While that might be true now enterprise is still running stuff on .NET 2.X and .NET 4.X is still dominant overall.

It will be years until enterprise shops are caught up to where .NET is atm, that is just the way of things.

FWIW it's not much better in Java-land. Most enterprise shops have apps they refuse to invest in upgrading off of Java 6. Java 8 still has huge share though thankfully in the last few years Java 11 is catching on.

I like Java and C# a lot, they appeal to me above the rest of the langs for practical reasons but I don't miss distancing myself from actual enterprise development - that is where passion goes to die.

Re:“I am literally losing sleep” over Java (1996) by nudpiedo on Thursday January 06, 2022 @03:37PM (#29829736)
I used to think like that just to realize that the main two variables to guess the language a project got started are the industry and the year the coding began.

For example, projects that got started 10 years ago are very likely to have got in Java started (as it still even was the main programming language teacher at universities.)

New projects are more likely to get started in python, typescript, go or even c++ just depending the industry. It’s been a while since I do not see a new brand project starting in Java.

Someone may dismiss my opinion with a statistic, and it will also be fine. I don’t think Java did endanger Microsoft,

Re:“I am literally losing sleep” over Java (1996) by coldtea on Thursday January 06, 2022 @02:28PM (#29828646)
>Aren't there billions of Java smartcards that people carry in their pocket/wallet and use on a daily basis?

No.

Re:“I am literally losing sleep” over Java (1996) by smcl on Thursday January 06, 2022 @03:22PM (#29829497)
They are referring to SIM cards or newer credit/debit cards (the chip-and-pin ones): https://en.wikipedia.org/wiki/Java_Card
Re:“I am literally losing sleep” over Java (1996) by coldtea on Thursday January 06, 2022 @03:37PM (#29829727)
I guessed as much, but I don't think they're anything but niche in 2022.

They're not in regular (e.g. VISA, Mastercard) chip-and-pin credit cards for example, are they?

Re:“I am literally losing sleep” over Java (1996) by smcl on Thursday January 06, 2022 @03:43PM (#29829820)
So wikipedia says that it is, but honestly I am not an expert so let's just set that aside for argument's sake unless someone can definitively say one way or another. But it's definitely in SIM cards, which are indeed carried and used by billions daily
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @03:53PM (#29829981)
I think it is still Java in bank cards. Even Apple Pay implemented all their thingies in Java.
Re:“I am literally losing sleep” over Java (1996) by tannhaeuser on Thursday January 06, 2022 @10:36AM (#29824839)
I'm inclined to cite that saying where there are those programming languages everybody complains about, and those that nobody is using. Doesn't hold for HN, though ;)
Re:“I am literally losing sleep” over Java (1996) by rileyphone on Thursday January 06, 2022 @10:22AM (#29824628)
I hate on Java because it's terrible to program in and seems to make it harder to actually solve problems, between the store-brand version of object orientation that it's based on and the mountains of useless abstraction that begets. There's a reason its relative popularity is on a downward trend [0] - my generation of programmers were taught Java in college and learned to hate it. Though I will say that its narrowness and structure make it the best choice for outsourcing/getting the most out of the cheapest development resources. Just not something that I want to deal with.

[0] https://www.tiobe.com/tiobe-index/java/

Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @10:32AM (#29824791)
Tiobe is next to useless, and Java doesn’t beget useless abstraction - it is entirely up to you how you write your code. Also, while it is indeed started out as an OOP language, it is a mixed paradigm one nowadays (just as almost all languages are) — you are entirely free to program it in a much more functional way. It is especially freeing with the new records.
Re:“I am literally losing sleep” over Java (1996) by dilyevsky on Thursday January 06, 2022 @10:59AM (#29825202)
It’s true java the technology is actually pretty good. Java the culture on the other hand… It’s probably less to do with the language itself rather the fact it’s used mostly for boneheaded enterprise crud
Re:“I am literally losing sleep” over Java (1996) by kaba0 on Thursday January 06, 2022 @12:41PM (#29826773)
Java has as many developers as a smaller country, ranging from the numerous enterprise domain (you mention) to robotics, to HFT. The culture between these are really distinct between them.
Re:“I am literally losing sleep” over Java (1996) by dilyevsky on Sunday January 16, 2022 @01:46PM (#29958653)
Google says there are 7 million java devs globally. Lets put number of robotics/hft java devs at 100k which seems rather generous. So what are the remaining 98% working on?