Earlier quoted context omitted.
One area where C# really messed up is exception handling. See https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...
Java streams and a lot of other APIs are extremely ugly because of checked exceptions. Conversely, LINQ and delegates and a lot of other syntax is far cleaner in C#. Your linked blog is pretty wild. Only throw RuntimeExceptions to crash? Why not just Exit if that's the proper thing to do? If you treat all C# exceptions as RuntimeExceptions, then it satisfies the blog anyhow.
Java at 30: Interview with James Gosling
231–240 of 437 posts
Re: Java at 30: Interview with James Gosling
#232Earlier quoted context omitted.
I often run into problems running Python code under Linux. I don’t know if it is a me problem or if I’m missing the right incantations to set up the environment or whatever. Never had that much problems with Java. But I’m a Java and Ruby person so it might really be missing knowledge.
It's not you. Python packaging has regressed into a worse mess than it was 20 years ago. I limit myself to simple scripts that only rely on builtins. Anything more complicated goes to a more dependable language.
e.g. poetry, venv and pyenv have been mentioned in just the next few comments below yours. and this is just one example. i have seen other such seeming confusion and different statements by different people about what package management approach to use for python.
Re: Java at 30: Interview with James Gosling
#233Earlier quoted context omitted.
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.
It shouldn’t take 2 months of full time programming to beat the learning curve.
Re: Java at 30: Interview with James Gosling
#234Earlier quoted context omitted.
When I used Kotlin, it felt like Java, but with the antipatterns baked in as language features.
Could you explain which antipatterns you're referring to?
While operator overloading and infix functions aren't a Java anti-pattern, I also think the language would be improved by their removal.
Re: Java at 30: Interview with James Gosling
#235Earlier quoted context omitted.
I'm still trying to mentally grok the Clojure model and syntax hah. On my todo list. Clojure users seem to love it though. Do you have a tutorial that could sell it to me?
For syntax, maybe this general Lisp advice will help: consider a normal function call, like f(a, b). To make this into a Lisp function call, drop the unnecessary comma (whitespace is enough to separate tokens) like f(a b), and then move the function name inside the parentheses, like (f a b). Applying operators that are considered "primitive" in other languages are syntactically treated the same as functions. So imagi…
i am not a clojure or lisp expert, just saying.
Re: Java at 30: Interview with James Gosling
#236Java 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…
> 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…
In fact my experience has been that overuse of channels is a code smell that alot of new go developers fall into and later regret. There's a reason the log package uses a mutex for synchronization.
In general I think channels are great for connecting a few large chunks of your program together. Concurrency is great but also not every function call benefits from being turned into a distributed system.
I think that it would be a great idea to develop more concurrent go data structures with generics and I suspect inertia is what's keeping the community from doing it.
My credentials such as the are: been writing go since 1.0. worked at Google and taught go classes as well as owned some of the original go services (the downloads server aka payload server).
Re: Java at 30: Interview with James Gosling
#237Java 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…
That's like saying Linus was only the spark for git because he spent two weeks hacking it from scratch.
The whole world uses git now.
Re: Java at 30: Interview with James Gosling
#238Earlier quoted context omitted.
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
It sounds like you've only ever written code without dealing with it in production. You can't always plug your code into an IDE when your debugging someone else's JVM app on a remote server.
Re: Java at 30: Interview with James Gosling
#239Earlier quoted context omitted.
Personally I think C# is miles ahead of Java and in meaningful ways (like a drastically better implementation of generics, not to mention value types have existed for eons at this point and an FFI system that doesn't hate you for using it) But nobody seems to talk about or care about C# except for Unity. Microsoft really missed the boat on getting mindshare for it back in the day.
That's because the Microsoft of 2000 - 2014, the Ballmer era, was Microsoft-first. It didn't care about other platforms, it didn't care about the web, and it didn't care about open source. C# could be great, but it existed in a bubble. Java kept growing and wound up everywhere. It played nice with Linux. Enterprise Mac developers didn't have trouble writing it with IntelliJ. It spread faster because it was open. Saty…
which ones?
Re: Java at 30: Interview with James Gosling
#240Earlier quoted context omitted.
Oh yeah. I still don’t understand why we even moved away from the original JEE model, including the different roles (app dev, deployed, etc). The whole spec was great with the exception of entitybeans. It provided things that are still not available it anything else.. why do we store configuration/credentials in git (encrypted, but still). And the context were easy to configure/enter. Caucho’s resin, highly underrate…
Entity Beans were terrible, representing the height of JEE over complexity. I remember editing at least 3 classes, a couple interfaces, and some horrific XML deployment descriptors to represent an "entity." A lot of the tooling was proprietary to the specific app server. On top of that, it was slow. In the early 2000's, I used to work on JEE stuff for my day job, then go home and build PHP-based web apps. PHP was at…