6 ms·
What in the java language makes you think it is less suitable to be used without an IDE than other languages?
by avodonosov 3y ago
What 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
- matsemann 3y agoYup, hence "used to", but I could be clearer it's no longer an issue.
- vips7L 3y agoMy 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.
- 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.