Live data from Hacker News

Java at 30: Interview with James Gosling

thenewstack.io

371–380 of 437 posts

Re: Java at 30: Interview with James Gosling

#371

Earlier quoted context omitted.

A lot of boilerplate and XML hell! What did you like about JEE? I worked in that world for years and don't miss it in the least.

You know what's funny? Spring (earlier versions) had even more xml ;-) I dunno it just worked for me. But I kept using the standards, no vendor lockin stuff, which bea etc always wanted. I think the servlet design is great, the whole packaging/deployment model is great. And then well the session beans were overkill in general, so they were swapped out quite early by me. Swapped jsp out for I think velocity templates.…

I think servlets are great, too. Coincidentally I also swapped out JSP for Freemarker and then Velocity templates pretty early. The session beans and entity beans I could both live without. The "heavy weight" nature of the commercial app servers really bothered me. JBoss was fine, but WebLogic, WebSphere, etc were awful.

Re: Java at 30: Interview with James Gosling

#372
post #359

Earlier quoted context omitted.

Rust is genuinely novel, so for most of us its going to be less familiar, so it will take longer to learn. It's not like learning Python if you already know Ruby, for example. The upside is that it offers some pretty great guarantees you can't (yet) find elsewhere. If you want those guarantees it will be worth it, if those guarantees don't matter to you, it may feel like a slog.

What guarantees are you speaking of exactly?

The banner one is memory safety without garbage collection. This enables is a terrific degree of library composition. Unlike C/C++, you can generally expect that libraries you pull in will also be memory safe.

The other one is thread safety, due to the compiler-enforced ownership semantics that prevent threads from accessing shared data unless they do so in a well-defined way.

Re: Java at 30: Interview with James Gosling

#373

Java frustrates the absolute shit out of me. An objectively terrible language coupled with insanely great garbage collectors, insanely great JIT compilers, and insanely great IDEs. Why couldn't we have had these things for Lisp?* I mean, if 1/1000 of the intellectual horsepower that's been thrown at Java had been thrown at Lisp, we'd all be driving to work in orbit-capable flying cars that used a teaspoon of fuel per…

Clojure is around and still going strong! I mean the IDE experience is probably not what you're describing, but you can use the JVM with a mature, productive Lisp language.

Re: Java at 30: Interview with James Gosling

#374
post #269

Earlier quoted context omitted.

I rarely run into issues when using Poetry. If you use pip, add packages to requirements.txt willy-nilly and don't pin versions then you are asking for trouble.

Poetry doesn't fix the fact that python removes modules from the standard library every release.

I've never run into that.

Re: Java at 30: Interview with James Gosling

#375
post #373

Java frustrates the absolute shit out of me. An objectively terrible language coupled with insanely great garbage collectors, insanely great JIT compilers, and insanely great IDEs. Why couldn't we have had these things for Lisp?* I mean, if 1/1000 of the intellectual horsepower that's been thrown at Java had been thrown at Lisp, we'd all be driving to work in orbit-capable flying cars that used a teaspoon of fuel per…

Clojure is around and still going strong! I mean the IDE experience is probably not what you're describing, but you can use the JVM with a mature, productive Lisp language.

Fair point.

To me, Clojure is an "almost-lisp" because of its lack of cons cells, its use of all the brackets on the keyboard, and its dependence on the JVM which can't do tail jumps.

I love Common Lisp because it compiles down to the metal and you can write code with it that starts instantly and runs very fast.

But all the above is more about personal taste than anything else, so maybe I should try Clojure again.

Re: Java at 30: Interview with James Gosling

#376
post #136

Earlier quoted context omitted.

I have been badly burned, twice, by Python's cavalier attitude to backwards compatibility

Python "the language" or Python "the ecosystem"?

The language?

I am a mere user. I have two Python based systems that worked in Debian 11 and not in Debian 12

Python 3.9 to 3.11 I think was the change.

A

Re: Java at 30: Interview with James Gosling

#377
post #288
post #271

Earlier quoted context omitted.

You eventually learn you leverage lifetimes. You just need to get over that point in the learning curve. I very rarely run into those types of issues, and it's very freeing knowing that I can write libraries that are so hard to misuse because you can leverage the type system. And macros are a part of that!

Why do I need to? Why can't I let the garbage collector deal with it? Rust's macros on the other hand are excellent, and more languages should have expressive macros like that.

You need lifetimes in order to make the affine types ergonomic to use through borrowings and aliasing mechanics. You want the affine types to prove all kinds of things about resource management, beyond just freeing allocations, which we generally call RAII. You model file and network handles as RAII, mutex locks as RAII.

Other languages use constructs like context managers or try-with-resources to capture this, but these constructs are very limited and make it very hard or impossible for these resource types to be put into a container and passed between threads. In Rust this is trivial and actually just works.

Garbage collectors usually give much weaker guarantees about when objects are freed, so destructors (which are sometimes not even available, like in JS) might only be called much later. You can't rely on a GC to unlock a muted for you. But in Rust it happens when the guard is dropped, always, immediately after it's last needed.

Re: Java at 30: Interview with James Gosling

#378
post #272

Earlier quoted context omitted.

Well to be fair, if you wanted Performance, Linux support, and a framework which was built with dependency injection and async support in mind and not just have them as patched in footguns, you had to migrate to .NET Core. A Java 8 Spring app was just good enough.

If you want linux support, .net is not what you want. Linux support is an afterthought and it shows. And you never know if it might be dropped next year.

If you are a .NET shop, .NET core still has a better Linux than Legacy .NET framework hence the migration.

If you are a Java shop everything just works so why touch it?

Re: Java at 30: Interview with James Gosling

#379
post #229

Earlier quoted context omitted.

i like poetry though i've moved to uv - both work really well

I use pipenv and it kind-of-works. Will try uv or poetry though - which one would you recommend?

I can't recommend uv enough. It's so fast, and uvx is so useful to run a random Python CLI tool. If you want to do things like you're accustomed to with pip you just `uv pip ...`

Re: Java at 30: Interview with James Gosling

#380
post #261

Earlier quoted context omitted.

That's a really narrow view of the world, and I think another Javaism to think that Java is the entire world. Today's multi-service deployments run tens if not hundreds of auxiliary processes not using Java. They use network overlays that change how processes interact with the network core. A person who is debugging a knock on effect issues has to be able to look through many different layers of processes, many of wh…

When you need to debug across the entire system and into the kernel, I'd use dtrace which has had java stack frame support since... I don't remember anymore, but closing in on 20 years.

No one uses dtrace anymore. bpftrace is integrated into the kernel and can extract btf type information embedded into the kernel binary.
Post reply on HN