Live data from Hacker News

Java at 30: Interview with James Gosling

thenewstack.io

401–410 of 437 posts

Re: Java at 30: Interview with James Gosling

#401

Earlier quoted context omitted.

Let me extol the virtues of Java the language. You can take pretty much any code written for Java 1.0 and you can still build and run it on Java 24. There are exceptions (sun.misc.Unsafe usage, for example) but they are few and far between. Moreso than nearly any other language backwards compatibility has been key to java. Heck, there's a pretty good chance you can take a jar compiled for 1.0 and still use it to this…

That's not the virtues of Java the language . That's the virtues of Java the backward-compatible platform. That is, you didn't say anything about the language (syntax and semantics), you only talked about backward compatibility. (It's still a valid point. It's just not the point you labeled it as.)

The language also follows the backwards compatibility principles. Java hasn't, for example, added new keywords in a backwards incompatible way. You can, for example, have something like

    int record = 1;
    double var = 2;
even though `var` and `record` are now used to create and define things.

Re: Java at 30: Interview with James Gosling

#402
post #272

Earlier quoted context omitted.

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?

How do you tell systemd/sysv that your daemon is now ready to accept connections? How do you log to syslog?

In java there's no equivalent to daemon() (unless you go out of your way to call the libc) and java doesn't support SOCK_DGRAM for unix sockets, so no syslog either.

.net seems to have the same issues.

"everything just works" is true only for a very very narrow definition of "everything" which leaves out "daemon that works decently"

Re: Java at 30: Interview with James Gosling

#403

Earlier quoted context omitted.

> The API Which one?

Don't bother: https://news.ycombinator.com/item?id=43396171 These people could not care less about engaging with the subject, they are here because they feel obliged to engage in a moment of hatred of what they think is an enemy tribe.

I mean… I provided justifications and links. The fact that you choose to disregard all of that is on you.

And the bit where you got angry because I didn't reply quick enough on an internet forum shows that perhaps you need to improve your manners.

Re: Java at 30: Interview with James Gosling

#404
post #320

Earlier quoted context omitted.

It's probably possible to do if you think about it carefully but generally enqueuing a message is going to take a lock, especially if you can send an arbitrary number of messages (which may require the queue to be reallocated).

One very common queue implementation you can use to implement actors is the crossbeam-deque. It's work-stealing in nature, works in multi-threaded environments and has no locks. The implementation is quite simple to follow: https://github.com/crossbeam-rs/crossbeam/blob/master/crossb...

> One very common queue implementation you can use to implement actors is the crossbeam-deque

I can't find any references to a "crossbeam dequeue" outside of Rust sources. Is this a neologism for a "very common" pattern, or just very common in Rust?

Re: Java at 30: Interview with James Gosling

#406
post #30
post #7

Java performance isn't the fastest, that's ok, a close 3rd place behind C/CPP ain't bad. And you're still ahead of Go, and 10x or more ahead of Python and Ruby. Java syntax isn't perfect, but it is consistent, and predictable. And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), it's just pressing control-space all day and you're fine. Java memory management seems weird from a Unix Philosophy POV…

more like 100x faster than Python/Ruby and that's before you throw in real multithreading

Let's not pluck numbers out of thin air.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: Java at 30: Interview with James Gosling

#407

Earlier quoted context omitted.

Java could have easily caught up with C# in the early 2000s. In 2001 Pizza (Scala's ancestor) showcased generics, higher-order functions, ADTs and pattern matching. Interestingly enough only generics made it to Java in a reasonable timeframe, the rest came only much later. Aside from early versions being rushed, I feel that Java's success and adoption were the bigger issue. While Microsoft could iterate quickly and b…

In fact, Java 1.5 got generics in 2004, one year before C# 2.0 added them in 2005. OTOH C# 2.0 had anonymous delegates, although syntactically they were still very verbose (no type inference for arguments) and thus only marginally better than Java's anonymous classes. It was really from 2007 on (.NET 3.5 / C# 3.0) that C# started to get major features at an ever increasing pace while Java significantly stagnated for…

Thanks, my recollection of C# evolution was blurry, I stand corrected.

So really, Sun and Oracle could have definitely moved faster around Java 6 and 7, the Java 8 release took a long time given the feature set.

I feel that records could have come quicker, their implementation isn't exactly ground breaking. Avoiding the async/await route was a smart call though, and Loom could probably not have happened much earlier.

Valhalla is another can of worms entirely

Re: Java at 30: Interview with James Gosling

#408
post #30

Earlier quoted context omitted.

more like 100x faster than Python/Ruby and that's before you throw in real multithreading

I have heard around 50x, which is about the same as between assembly and BASIC on 8-bit systems.

We could measure programs.

https://news.ycombinator.com/item?id=44022366

Re: Java at 30: Interview with James Gosling

#409
post #320

Earlier quoted context omitted.

One very common queue implementation you can use to implement actors is the crossbeam-deque. It's work-stealing in nature, works in multi-threaded environments and has no locks. The implementation is quite simple to follow: https://github.com/crossbeam-rs/crossbeam/blob/master/crossb...

> One very common queue implementation you can use to implement actors is the crossbeam-deque I can't find any references to a "crossbeam dequeue" outside of Rust sources. Is this a neologism for a "very common" pattern, or just very common in Rust?

crossbeam is a package name. It would be like googling “Nokogiri XML” and only getting Ruby results.

The generic name is just Deque. https://en.wikipedia.org/wiki/Double-ended_queue

Re: Java at 30: Interview with James Gosling

#410

Earlier quoted context omitted.

> One very common queue implementation you can use to implement actors is the crossbeam-deque I can't find any references to a "crossbeam dequeue" outside of Rust sources. Is this a neologism for a "very common" pattern, or just very common in Rust?

crossbeam is a package name. It would be like googling “Nokogiri XML” and only getting Ruby results. The generic name is just Deque. https://en.wikipedia.org/wiki/Double-ended_queue

Thanks.
Post reply on HN