Live data from Hacker News

Java at 30: Interview with James Gosling

thenewstack.io

121–130 of 437 posts

Re: Java at 30: Interview with James Gosling

#121
post #95

Earlier quoted context omitted.

> And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), Java's tools are really top notch. Using IntelliJ for Java feels a whole new different world from using IDEs for other languages. Speaking of Go, does anyone know why Go community is not hot on developing containers for concurrent data structures? I see Mutex this and lock that scattering in Go code, while in Java community the #1 advice on w…

Just implement concurrency with actors and u save up on some locks and mutexes... The patterns are available, its up to the community to apply proper concurrency patterns.

The only replacement for locks/mutexes is a lock free data structure. Locks are not what make concurrency possible, they are what makes it data-safe.

You can use platform threads, user-space threads, language-provided "green" threads, goroutines, continuations or whatever you wish for concurrency management, but that's almost orthogonal to data safety.

Re: Java at 30: Interview with James Gosling

#122

Earlier quoted context omitted.

My school started us off in microcontroller programming in C then Java for intro to data structures and OOP then back to C (and MIPS assembly) for systems/OS/concurrency. One thing I appreciate Java over Python for DS/Algo is the clear delineation between abstract data type and underlying data structure - IMO is easy to get a wrong mental model with Python. But teaching OS concepts in Java seems a little crazy to me.

Hm... Why? Java seems to be a perfect language in which to understand things at a conceptual level!

Good to get your hands in the dirt as well.

Re: Java at 30: Interview with James Gosling

#123

I've been working in .NET/C# for the past few years, and while I'm happy with it, I still think the JVM/Java are the best ecosystem overall I've worked in. It's amazing how many things the Java ecosystem gets right that .NET gets wrong. For instance, Java introduced the fork/join pool for work stealing and recommended it for short-lived tasks that decomposed into smaller tasks. .NET decided to simply add work-stealin…

The thread pool starvation problem in .NET is annoying when you encounter it. Personally I have not bumped into since the .NET framework days.

The thread pool implementation has been tweaked over the years to reduce the impact of this problem. The latest tweak that will be in .NET 10:

https://github.com/dotnet/runtime/pull/112796

I’m not sure a thread pool implementation can immune to misuse (many tasks that synchronously block on the completion of other tasks in the pool). All you can do is add more threads or try to be smarter about the order tasks are run. I’m not a thread pool expert, so I might have no idea what I’m talking about.

Re: Java at 30: Interview with James Gosling

#124

I admire Java as a success story, but I still have a deeply ingrained aversion to it for many reasons. I will admit that many of the reasons are due to Java's legacy as the language of bloated corporations, and its creation of overly verbose, magic fueled frameworks and poorly written code. Java as a language goes hand in hand with the idea that code is coal to be shoveled into the furnace, and we should all throw ou…

In my 20+ years using java, not once have I used strace or gdb. Java itself has fantastic debugger support, and IDEs have built in step through capabilities.

Mentioning Java and Python in the same way in the context of performance is really odd. Python is nowhere near the JVM when it comes to performance

Re: Java at 30: Interview with James Gosling

#125

I personally appreciate Java (and the JVM) much more after having tried other languages/ecosystems that people kept saying were so much better than Java. Instead, I just felt like it was a "the grass is greener" every time. The only other language that I felt was an actual massive improvement is Rust (which so far has been a joy to work with). It's a shame imo that it's not seen as a "cool" option for startups, becau…

My feelings exactly. Go was particularly disappointing, it promised everything but only felt like a sidegrade from Java. Screw it, a downgrade, until go errors get stack traces.

The reason I prefer the Go ecosystem to Java is cultural, rather than technical. Sure, the JVM is very impressive and the language has been evolving, but the culture around Java seems to encourage needless complexity.

Of all the languages I've had to work with trying to get to know unfamiliar code-bases, it's the Go codebases I've been quickest to grok, and yielded the fewest surprises since as the code I'm looking for is almost always where I expect it to be.

Re: Java at 30: Interview with James Gosling

#126
post #120

I personally appreciate Java (and the JVM) much more after having tried other languages/ecosystems that people kept saying were so much better than Java. Instead, I just felt like it was a "the grass is greener" every time. The only other language that I felt was an actual massive improvement is Rust (which so far has been a joy to work with). It's a shame imo that it's not seen as a "cool" option for startups, becau…

Funny. I've been trying rust for the past 2 months fulltime, and i'm really wondering how you can call it a "joy to work with" when compared to java, at least for server development. Rust feels like walking on a minefield, praying to never meet any lifetime problem that's going to ruin your afternoon productivity ( recently lost an afternoon on something that could very well be a known compiler bug, but on a method w…

> I've been trying rust for the past 2 months fulltime,

> recently lost an afternoon on something that could very well be a known compiler bug

With respect, at two months, you're still in the throes of the learning curve, and it seems highly unlikely you've found a compiler bug. Most folks (myself included) struggled for a few months before we hit the 'joyful' part of Rust.

Re: Java at 30: Interview with James Gosling

#127
post #120

I personally appreciate Java (and the JVM) much more after having tried other languages/ecosystems that people kept saying were so much better than Java. Instead, I just felt like it was a "the grass is greener" every time. The only other language that I felt was an actual massive improvement is Rust (which so far has been a joy to work with). It's a shame imo that it's not seen as a "cool" option for startups, becau…

Funny. I've been trying rust for the past 2 months fulltime, and i'm really wondering how you can call it a "joy to work with" when compared to java, at least for server development. Rust feels like walking on a minefield, praying to never meet any lifetime problem that's going to ruin your afternoon productivity ( recently lost an afternoon on something that could very well be a known compiler bug, but on a method w…

I'm not discounting your experience, or saying you're wrong or anything like that. I've been writing Rust for a while, and for me, that feeling went away. Lifetime/ownership problems used to run me over but it almost never happens anymore. I think Rust has a rather severe "hump" that a lot of people run headlong into, but it does get better, I promise you. You start thinking in ownership/borrowing terms and it just fades into the background at some point. Rust is easily my most productive language now. Again, not discounting your experience at all, it can be rough starting out.

Re: Java at 30: Interview with James Gosling

#128

Earlier quoted context omitted.

> And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), Java's tools are really top notch. Using IntelliJ for Java feels a whole new different world from using IDEs for other languages. Speaking of Go, does anyone know why Go community is not hot on developing containers for concurrent data structures? I see Mutex this and lock that scattering in Go code, while in Java community the #1 advice on w…

It's a core principle. Don't communicate by sharing memory; share memory by communicating. The overuse of Mutex and Lock are from developers bringing along patterns from other language where they are used to communicating via shared memory. So this aspect of the language just doesn't click as well for many people at first. How long it takes you to get it depends on your experience.

My experience is a shocking amount of the golang community believe channels are a performance problem for whatever they're doing, and they use mutexes in some misguided effort at optimization.

But then I have also encountered Rust people that will look down on Java but had no idea buffered I/O had higher throughput than unbuffered.

Re: Java at 30: Interview with James Gosling

#129
post #102

Java is a great success story. Though, to be fair, James Gosling was the spark but has not been the steward. Even as early as Java 1.1 and 1.2 he was not particularly involved in making runtime, library, or even language decisions, and later he wasn't the key to generics, etc. Mark Reinhold has been the hand's-on lead since 1.1, first integrating early JIT's, HotSpot, the 1.2 10X class explosion, and has been running…

The whole core team is amazing. Gosling wanted a language that was practical from a development POV. Over the years, it's been refined into a language with a fair amount of mechanical sympathy on top of the development experience. Thanks to folks like Mark Reinhold and Brian Goetz.

I have no love for Oracle the big bad company. But I am deeply greatful they've managed to keep that group moving forward.

Re: Java at 30: Interview with James Gosling

#130

I personally appreciate Java (and the JVM) much more after having tried other languages/ecosystems that people kept saying were so much better than Java. Instead, I just felt like it was a "the grass is greener" every time. The only other language that I felt was an actual massive improvement is Rust (which so far has been a joy to work with). It's a shame imo that it's not seen as a "cool" option for startups, becau…

My feelings exactly. Go was particularly disappointing, it promised everything but only felt like a sidegrade from Java. Screw it, a downgrade, until go errors get stack traces.

[deleted]
Post reply on HN