7 ms·
Still waiting for VS Code to support Java 21. Java is not the language to use without an IDE.
by theanonymousone 3y ago
Still waiting for VS Code to support Java 21. Java is not the language to use without an IDE.
- jgon 3y agoBrian 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 https://youtu.be/eXCx2hW_xNI?t=1955
- vips7L 3y agoThings take time. If you want you can contribute resources to the vs code plugin and the eclipse language server.
- avodonosov 3y agoWhat in the java language makes you think it is less suitable to be used without an IDE than other languages?
- matsemann 3y agoIt 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.
- vips7L 3y agoYou haven't had to declare the type since Java 10. var myThing = new MyThing();
- riku_iki 3y agostill need it for class members, unlike in some other languages.
- kaba0 3y agoMost 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.
- riku_iki 3y agotypescript 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.
- kaba0 3y agoTypescript’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
- palata 3y agoThat'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()`.
- paulddraper 3y agoIt's verbose to write and read. You need an assist for both.
- palata 3y ago> You need an assist for both. I don't. Do you?
- collinvandyck76 3y agoObviously 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.
- avodonosov 3y agoWe 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++?
- palata 3y agoExactly this. Who develops in Swift, Kotlin or Rust without ever using an IDE nowadays?
- paulddraper 3y agoI do. Or at least, it's a big, big improvement.
- palata 3y agoAnd it is not for other languages? What makes Java special here?
- jillesvangurp 3y agoThe 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.
- avodonosov 3y agoYou 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.
- jillesvangurp 3y agoWhich 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.
- lern_too_spel 3y agoClass-level imports and lots of classes.
- theanonymousone 3y agoMy 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.
- palata 3y agoI 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.
- matsemann 3y agoI can't imagine doing Java in VS Code instead of Intellij. Is there something I'm missing out on?
- jcadam 3y agoNo 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 :)
- theanonymousone 3y agoThe 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 https://github.com/coder/code-server
- deleted 3y ago[deleted]
- ilikehurdles 3y agoLunatic meaning maniac or fool.
- jcadam 3y agoI was being facetious, of course :)
- smlavine 3y agoIt's a hyperbole that no reasonable person would get offended by. So nobody except Emacs users. ;)
- deleted 3y ago[deleted]