Hacker News new | past | comments | ask | show | jobs | submit login

Still waiting for VS Code to support Java 21. Java is not the language to use without an IDE.



I can't imagine doing Java in VS Code instead of Intellij. Is there something I'm missing out on?


No idea. I use IntelliJ for Java/Kotlin and emacs for everything else (Clojure, Python, JS, etc). I still encounter the occasional lunatic who uses eclipse or netbeans.

I know VSCode is the "standard" editor for front-end devs, and so I assume some of them are trying to keep their code editor when moving into backend work. I have to believe it's not as good - for a time I really, really tried to make emacs work for Java development, but it just.... doesn't :)


The reason I use VSCode is Code Server[0]. It is certainly not as powerful as IntelliJ, but the I have to get used to it because the web-based IDE is a must for me.

By the way, unless my English is terribly bad, calling someone lunatic for their choice of IDE may not be a great idea.

[0] https://github.com/coder/code-server


It's a hyperbole that no reasonable person would get offended by.

So nobody except Emacs users. ;)


Lunatics all.


Lunatic meaning maniac or fool.


I was being facetious, of course :)


Same for IntelliJ: JetBrains Space

But it also supports Gitpod, Google Cloud, GitHub Codespaces, Amazon CodeCatalyst, and Connect to Coder [0]

There's also Dev Container, that gives all the developers the same dev environment as a container.

https://www.jetbrains.com/help/idea/remote-development-a.htm...


Doesn't it require you to have JetBrains locally installed on your machine to be able to connect?


Dunno, I always have it installed.

BTW, CodeWithMe [0] urls can automatically install some viewer to be able to participate in the call, don't know if it's the full editor or not. But they can install the full editor the same way for the above.

https://code-with-me.global.jetbrains.com



At my job a lot of people hate on Eclipse, but honestly I find it quite nice. I use IntelliJ for my private projects and think both are on par.


Base vs Base installations, Intellij is better. Ergonomically, I find Intellij better.

However, my experience with it has been that once you get every plugin you need loaded it becomes dog slow and even basic stuff like reference jumping becomes a slow, tedious slog compared to Eclipse.


Yeah, I used both Eclipse and Intellij and Eclipse is actually good IDE. Both have advantages and disadvantages, but I can not say that Intellij is better.

The most hate for Eclipse, in my job, comes from people who never used it. They basically dislike how it looks like and that it is not exactly same as Intellij.


fellow eclipse die hard here ...

It's definitely a very complex beast but once you do master that complexity it is such a power tool. Even though I routinely do work in IntelliJ I miss various things enough from Eclipse that I always go back.

I just wish it had proper Kotlin support.


How's the Kotlin language server performance for you? When I last tried it was using up so much resources for the simplest Kotlin file. I gave up and moved to intelliJ (which incidentally offers plenty of refactoring features you don't get in vscode)


Kotlin is horrible in every IDE other than IntelliJ/AndroidStudio and JetBrains has little motivation to fix that.


That was my feeling too. Kotlin in Vscode was not usable. My computer ground to an halt as soon as I typed something


Intellij does a lot, and VS Code is very light. Some people prefer an IDE that does a lot, but some don't care and benefit from VSC being lightweight. Also, some projects are janky, and VS Code is easier to get to ignore that jank. Plus, I find VS Code's hotkeys to be much more intuitive as a long-time Windows user and hotkey addict.

No matter what I do locally, the final word is a pipeline build. A command line is closer to that than either IDE, so at times I've really appreciated VS Code mostly getting out of my way.


> VS Code is very light

Did you actually measure that? In my experience, once you've added the bare minimum of language support/LSP that's far from the case (and at comparable memory footprint VSC ends up doing less and is just less capable)


Honestly I didn't care about any objective measure, development "felt" less laggy in VSC.


Exactly. Being lightweight is important when you are running the thing on some cheap VPS. Also the multi-lunguality, since you don't have "room" for multiple IDEs.


> VSC - lightweight

Are we talking about the same thing?


If you've seen IntelliJ, you won't have any problem calling VSCode lightweight :D


Though I prefer IntelliJ, VS Code is fine.

I sometimes switch to VS Code just to use Lischke's terrific ANTLR plugin.

https://marketplace.visualstudio.com/items?itemName=mike-lis...


Brian Goetz just gave a talk about all the stuff that's been delivered up to Java 21 that announced they'd be rolling out a fully supported VS Code plugin for Java that should be better than the current language support. It should be out within the next week or two.

Timestamp for the announcement: https://youtu.be/eXCx2hW_xNI?t=1955


Things take time. If you want you can contribute resources to the vs code plugin and the eclipse language server.


What in the java language makes you think it is less suitable to be used without an IDE than other languages?


The fact that IDEs are just unusually smart specifically for that languages relative to relatively dumb editors like vs code, which lack most of the conveniences in the form of auto complete, a wide variety of refactorings, auto fixes, etc. Opting out of all that is not something a lot of people do. Botttom line, you are missing out on so many good tools by not using a proper IDE with Java that it's borderline negligent to opt out of that. It's negligent because you start opting into preventable issues (formatting, warnings, common bug patterns, dead code, etc.) and generally end up wasting a lot of time fixing things manually that you shouldn't have to deal with because your IDE should be doing those things. For example imports are not a thing I ever type manually. Not a thing. Most warnings are addressed with a simple alt+enter, which will typically suggest a usable fix. With and IDE you see those warnings and can act on them.

Kotlin has the same advantage and is developed by Jetbrains who also develop intellij and of course know what they are doing on this front. Support for other languages in intellij is also nice but typically a lot more limited than the support for Java and Kotlin. E.g. pycharm is alright for python but not that much different from what you get in vs code. You get a handful of refactorings and that's about it. Dynamically typed languages are just a lot harder to support with proper tools. Too much uncertainty about what does what or even what types things are.


You describe the great advantage IDE gives. My point though is that without IDE java is basically as good as most other languages without IDE.

I've spent years coding in java daily, most of the time in IntelliJ of course. But there was a time when I had to use for a project a very modest editor, with just basic syntax highlighting. After several days you get used to it and it does not bother you.


Which would put you at a disadvantage relative to other Java programmers. In many teams, that would not be tolerated if you then start committing code with obvious issues related to your poor tooling choices.


How did you jump from "After several days you get used to it and it does not bother you" to "you then start committing code with obvious issues"?

You can't just make up stuff and then blame other people for it...


It's verbose to write and read.

You need an assist for both.


> You need an assist for both.

I don't. Do you?


Obviously GP think it's helpful? Just because you're in the minority that doesn't need IDE or LSP assist writing Java, I think that most people would argue that assist for Java is beneficial even if you personally don't need it and there's no sense in flexing about it.

I personally always use IDE/LSP for Java, even though it's been many years since I've written it, because it helps me deliver business value faster.


We are comparing java with other languages here, not questioning advantages of IDE.

Why people think java without IDE is different than some other language without IDE.

Is java more verbose than, for example, C++?


Exactly this. Who develops in Swift, Kotlin or Rust without ever using an IDE nowadays?


I do.

Or at least, it's a big, big improvement.


And it is not for other languages? What makes Java special here?


Good question. See my earlier comment.


My other language of heavy use is Python. Maybe not writing a Python script from scratch, but at least I can modify a Python script in some basic editor (e.g. GitHub web UI). The same thing will be more difficult in Java.

I cannot judge about Rust and C++ which are mentioned here. I also write some Scala and it is not far from Java in that manner.


I agree, writing Python is easier without an editor than writing Java, Scala, Kotlin, Rust or C++.

This said, Python is often completely unsuitable for jobs solved by Java, Scala, Kotlin, Rust or C++. So I don't think it is a fair comparison.


Class-level imports and lots of classes.


It used to be lots of boilerplate. Like

MyClassType myClassType = new MyClassType()

And then it was nice to use an IDE to help write some of that. Or generate java beans etc.

But with that said, I don't think it's much you need an IDE for, it's more that java enables IDEs to do much more than it can for certain other languages.


You haven't had to declare the type since Java 10.

   var myThing = new MyThing();


Yup, hence "used to", but I could be clearer it's no longer an issue.


My issue with your statement is that you're pretending that this was a recent issue. This hasn't been an issue in over half a decade. Do we point out bugs in libraries from 6 years ago? Are we critical about what other languages looked like then? In my experience, Java is the only one that gets this criticism.


still need it for class members, unlike in some other languages.


Most languages don’t do type inference in “signatures” (function, but also class/struct members), as it would give you negligible benefit, a huge cost for the compiler and is commonly thought of as a bad practice.

Out of Scala, Rust, I believe even Kotlin, none do inference in these places. Even Haskell, which does infer function signatures as well, need explicit type annotation for `data` definitions.


typescript does such inference.

I disagree with you about huge cost for the compiler and benefits are the same as in normal code block: reducing boilerplate.


Typescript’s type system is deliberately not sound though.

In general, there is no type inference available for OOP type-hierarchies as opposed to a more Haskell-like type system, where Hindley-Milner works


I don't have strong knowledge in types theory, but why

class C { a: int = 0; }

can't be replaced with

class C { a = 0; }

? what issues it brings?..


That can. But what about a field that is not initialized there?


obviously you would need to provide type.


That's a thing I don't get. Maybe I am doing something completely wrong, but the vast majority of my time as a developer, I am not typing code. I can afford 5s typing `MyClass myClass = new MyClass()`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: