News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by armchairhacker on Tuesday October 25, 2022 @12:05PM (#33332462)
This is funny because the other language I think of which wouldn’t be nearly as popular without an IDE, is Java. Especially older versions of Java.

Java is way too verbose to be workable if I have to write out all of the class declarations and anonymous classes and “equals/hashCode/toString” boilerplate and “ExtremelyLongClassName foo = bar.extremelyLongMethodName(…)”; and there are too many pitfalls like comparing with “==“ instead of “Object.equals” and implicit null. Except that I don’t have to write out anything or worry about any pitfalls (well, implicit null still hits me sometimes, but @NotNull and @Nullable make it much less common) in IntelliJ. IntelliJ has such powerful and seamless analysis, it does aggressive code folding on Java 7 so that you are looking at code with “var”s and lambdas. It also has built-in support for popular libraries like Spring and Lombok.

IntelliJ single-handedly turns Java from a verbose, legacy language into something I could actually recommend and start new projects on (although at that point I usually go with Kotlin). And Eclipse, NetBeans have very deep Java analysis as well. Java may have started off without expecting IDE support but now IDE support is responsible for a large part of its popularity.

Re:From zero to 10M lines of Kotlin by JAlexoid on Tuesday October 25, 2022 @01:22PM (#33333515)
Yes. You either have a language that is easy or you have tooling to make it easy.

If I cannot access documentation for a library/function at a mere tap of a button - that language isn't going into my toolbelt. I have to code in like 5 languages at my dayjob, that's at least 3 different types of semantics for ==.

Java, and Kotlin, are great at that. It's the major pitfall for Scala(and a laundry list of others), on the other side(hey implicits and converters, that make even IntelliJ go "wut?"). Those long names in Java are actually a godsend. Give me "int indexInTheArray" over "int x" anyday. Explicitness of Python is also a pleasant thing to work with.

People forget that most software is boring website backends, business processes and similar tools. Most devs don't have mental capacity to devote to "the one and only" language+platform+ISA.

Re:From zero to 10M lines of Kotlin by taeric on Tuesday October 25, 2022 @04:50PM (#33335991)
This sort of flies in the face of how many people reject lisp systems, though. I could almost see that python is doing this, but the number of python users I have met that don't know how to use "help()" is... impressive.
Re:From zero to 10M lines of Kotlin by LinXitoW on Tuesday October 25, 2022 @06:02PM (#33336730)
It's not just the tooling. Having tried to work with Python in Intellij, the lack of typing means you literally have to GUESS what any non-primitive object can do.

It might also be an unhappy coincidence, but the library I was playing around with (scrapy) also had HORRENDOUSLY documented code. With Java/Kotlin, you can just click into any method/class and you'll get a useful doc string 99% of the time. With Python, I had to read the (incomplete) documentation.

Re:From zero to 10M lines of Kotlin by vendiddy on Tuesday October 25, 2022 @10:22PM (#33338988)
Are there languages out there that have done both?
Re:From zero to 10M lines of Kotlin by vips7L on Wednesday October 26, 2022 @10:08AM (#33343926)
This has been my experience with Scala. Even IntelliJ can’t figure it out sometimes and the documentation is all crazy type theory stuff.
Re:From zero to 10M lines of Kotlin by kaba0 on Tuesday October 25, 2022 @02:39PM (#33334534)
Do you think the same for Go as well? Because Go is by all means much more verbose than Java.

(But I do agree actually, a good IDE is much better investment than a minimal syntax revision)

Re:From zero to 10M lines of Kotlin by brendank310 on Tuesday October 25, 2022 @08:14PM (#33338012)
I'm curious how you come to this conclusion. Granted I never wrote much Java (and not in the last 10 years), but it was painfully verbose at the time. I've never had that reaction while writing golang (which over the last 3 years I've done a decent amount). Has Java gotten much more succinct?
Re:From zero to 10M lines of Kotlin by vips7L on Wednesday October 26, 2022 @12:42AM (#33339903)
Go is definitely far more verbose. Go cannot compete with switch expressions, pattern matching, and streams.
Re:From zero to 10M lines of Kotlin by kaba0 on Wednesday October 26, 2022 @01:34AM (#33340175)
That’s the interesting thing, how did this verbose feeling stuck to Java while not to Go, where your code is literally littered with if errs, you have way too deeply nested for loops, etc.

Java is a surprisingly expressive language even though it does have a few warts.

Re:From zero to 10M lines of Kotlin by brendank310 on Thursday October 27, 2022 @06:55AM (#33355772)
I'll have to give it another look if the situation presents itself. I think one factor of Java being remembered so unfavorably was it being early in my career.

I do think there should be a distinction on what is lumped as verbosity. Golang is vertically verbose with its error checking, and Java in my experience is at least more horizontally verbose (long lines).