[HN Gopher] The Kotlin Foundation
       ___________________________________________________________________
        
       The Kotlin Foundation
        
       Author : ta988
       Score  : 214 points
       Date   : 2021-02-13 15:20 UTC (7 hours ago)
        
 (HTM) web link (kotlinlang.org)
 (TXT) w3m dump (kotlinlang.org)
        
       | biztos wrote:
       | So Roman Elizarov is the Lead Language Designer, and also 1/3 of
       | the Language Committee, so the Language Committee has to be
       | united against him in order to block any design decision.
       | 
       | I have no idea whether that's a good idea, but it looks a little
       | funny.
       | 
       | Also, is UT Austin officially involved, or is it just William R.
       | Cook personally? This is ambiguous from the text.
       | 
       | Anyway I hope this gets them whatever they want out of it, I
       | quite like Kotlin and might learn it "for real" some day.
        
         | nevi-me wrote:
         | I'm assuming that if/when more organisations join, the Language
         | Committe can be extended.
         | 
         | The balance might still work out in the short-term, as the
         | Language Committe's scope is narrower [0]. This makes sense as
         | the LC seems to be more applicable for when external developers
         | propose potentially breaking changes.
         | 
         | [0] https://kotlinlang.org/docs/language-committee-
         | guidelines.ht...
        
       | peter_retief wrote:
       | Kotlin is a really nice clean language to delop with, it should
       | get more and more traction.
        
       | formerly_proven wrote:
       | I would really like a Sphinx theme that is as clean as the theme
       | of these docs. Most of the Sphinx themes are really kinda
       | cluttered and not neat.
        
       | surfsvammel wrote:
       | I've only ever used Kotlin for competitive programming, but I
       | must say there is no other language that I get so much joy from
       | using. I'm serious, Kotlin makes me happy.
       | 
       | But, I have been worried about it's future. I hope this helps
       | make sure it has a future.
        
       | rogerthis wrote:
       | That's not news. It exists since, well, I really don't remember
       | (2018, I guess).
        
       | davnicwil wrote:
       | A question for HN - I like Java a lot for the 'http API talking
       | to SQL database' usecase, with my goto for that being dropwizard
       | or spring boot.
       | 
       | I've only ever looked at Kotlin code in blogposts, haven't ever
       | actually used it. I'm probably at least a few years behind on its
       | feature set, but I am aware of all the great features Java has
       | added in that timeframe, many no doubt inspired by Kotlin!
       | 
       | Would you advise me to use Kotlin over Java building a new API
       | from scratch in 2021, given where both languages and ecosystems
       | are today? Why or why not?
        
         | yes_but_no wrote:
         | I would, main reason being calling Java from Kotlin is
         | seamless. It makes most things easier by being expression
         | oriented and having less verbose yet familiar syntax also saner
         | type system. So you can just use it as better Java.
         | 
         | If you want to go further you can also use other nice features
         | like suspend functions, hot/cold channels, sealed classes.
        
         | surfsvammel wrote:
         | Try it out! I've been building with Java for about 13 years and
         | just started playing around with Kotlin last year, and I must
         | say that I fell in love immediately.
        
         | prpl wrote:
         | I did a dropwizard and kotlin project around 1.2.20 (3 years
         | ago) and it was fine even then, with some minor rough edges.
         | 
         | I would imagine everything is fine now.
        
         | jitl wrote:
         | Kotlin on the server is the dream
        
         | marton78 wrote:
         | For your use case just use PostgREST.
        
         | pjmlp wrote:
         | Other than Android, where Google is pushing Kotlin no matter
         | what, I would use the platform's official language, Java.
         | 
         | No need for FFI, additional IDE plugins, it works across all
         | Java IDEs, no need for idiomatic plugins, annotations to make
         | code understandable by the JVM, full access to JVM opcodes
         | without constraints or special cases, and it will be around as
         | long as the _Java_ Virtual Machine matters to the industry.
        
         | dbsmith83 wrote:
         | My team uses Kotlin + Dropwizard + Postgres a lot. I would
         | absolutely recommend trying Kotlin out on your next API. You
         | will find the code very easy to learn coming from Java, and it
         | is honestly a joy to work with compared to Java. You will find
         | your code much more concise yet more readable. Also, IntelliJ
         | gives you all kinds of hints for how you can make use of Kotlin
         | language features.
         | 
         | You can also easily handle nulls in Kotlin, since values have
         | to be explicitly nullable in order to be able to have one. This
         | is great for your application model layers. The val/var
         | paradigm is nice so you can stop having to remember to write
         | 'final'.
         | 
         | If you ever get stuck and don't know how to write something in
         | Kotlin, you can just write it in Java and either use it, or
         | just paste the code in IntelliJ and it will convert it to
         | Kotlin.
         | 
         | Lastly, Kotest + Mockk is awesome--super readable testing.
        
           | aweiland wrote:
           | What do you use at the database layer? Hibernate, or
           | something lighter, and more Kotlin native, like Exposed?
        
             | dbsmith83 wrote:
             | We use MyBatis annotations. Usually, for our specific use
             | case we are calling a Postgres sproc. It was a little
             | tricky for one part since we have a json type column, so we
             | had to create our own little pgobject mapper which took a
             | day to figure out how. Other than that, it has been a
             | breeze.
        
         | ta988 wrote:
         | You have to consider not only the language but what the team
         | working on it will look like. It is still a bit hard to find
         | server-side kotlin devs. On the other hand in my experience,
         | Java devs pick up Kotlin really quickly (as do Python devs
         | interestingly whereas they struggled with Java).
         | 
         | I'm a huge proponent of Kotlin on the server side, less on
         | frontend (JS) side.
         | 
         | If you go with Kotlin and Spring Boot, Micronaut or even just
         | Ktor,you'll likely not regret the choice. (I have no experience
         | with DropWizard).
         | 
         | Now if you choose Java it will not be a horrible choice either,
         | and it is not too hard to convert to Kotlin later if you
         | need/want to. I've heard cases of people going back to Java a
         | few years back, mostly for compiler performance reasons, but
         | there has been a lot of effort on that recently. And while
         | compiling Kotlin is still slower than compiling Java, the fact
         | that you can divide things more easily in multiple files and
         | incremental compilation compensates in most cases (except of
         | course in the case f a clean build).
        
           | BoorishBears wrote:
           | Strictly imo, using Kotlin with Spring Boot defeats the
           | purpose if you're trying to get away from traditional Java
           | web frameworks (didn't think I needed to spell this out due
           | to the next sentence, but HN gonna HN).
           | 
           | Kotlin is a chance to get away from the cruft and annotation
           | magic of traditional Java.
           | 
           | I use Ktor and it's everything you need for a modern API (and
           | can be deployed as a WAR if that's why you want Spring Boot)
           | 
           | Ktor's API that will be familiar to anyone who's used similar
           | "neo-web frameworks" in other languages like Gin or Express,
           | and it allows you to architecture your app in a way that
           | makes sense to you (so if you need DI, you can bring in
           | something like Koin, but you're never compelled to by the
           | framework)
        
             | scaladev wrote:
             | I thought ktor was a toy, but apparently YouTrack
             | (JetBrains' alternative to Jira) is built on top of it:
             | 
             | https://www.jetbrains.com/help/youtrack/standalone/Third-
             | Par...
        
               | isbvhodnvemrwvn wrote:
               | It's not surprising that the company behind the language
               | would promote use of tools native to that language. They
               | have the incentive to fix the tools if bugs are found to
               | make the ecosystem more attractive. Whether it's a good
               | choice for your use case - you need to evaluate it.
        
             | eweise wrote:
             | My old team used Spring and Kotlin and it was a really
             | productive combination. Spring isn't standing still. They
             | have first class support for Kotlin and rewriting their
             | framework to support the graalvm.
        
               | BoorishBears wrote:
               | Spring is not standing still, and I'm not trying to claim
               | it is, but there's still a fair bit of ceremony around a
               | lot of features
               | 
               | That's not necessarily a bad thing, _but_ usually people
               | who are giving the JVM a  "second chance" via Kotlin were
               | initially turned off by that ceremony
               | 
               | -
               | 
               | So when someone asks me "What should framework should I
               | try for Kotlin web services?" my answer is usually Ktor.
               | 
               | Because if they had to ask me, they probably aren't going
               | to be that in love with Spring Boot (people coming from
               | Java from example, are usually just going to default to
               | Spring Boot)
        
               | brabel wrote:
               | Java developers are spoiled for choice.
               | 
               | There's everything, from the simplest possible
               | https://sparkjava.com/, to the a little bit nicer
               | https://javalin.io/ (which has a Kotlin wrapper), to the
               | high performance and full framework https://vertx.io/
               | (which always had great multi-lingual support within the
               | JVM), to the newer and GraalVM-friendly
               | https://micronaut.io/ and https://quarkus.io/ ... for the
               | Enterprise-only crowd, you still have the JEE successor,
               | https://jakarta.ee/ and Oracle's own
               | https://helidon.io/#/ (which likes to position itself as
               | microservice focused, like Micronaut and Quarkus). Not to
               | mention lower level libraries you can use, like
               | https://www.eclipse.org/jetty/ and https://netty.io/.
               | 
               | Ktor has a tough fight to become dominant even in the
               | Kotlin world.
               | 
               | Spring Boot is, still, definitely the most popular
               | option, but it's still just one of very very many!
        
               | mkurz wrote:
               | You forgot https://www.playframework.com/
        
               | ivanche wrote:
               | Just to add https://www.ninjaframework.org/
        
               | vips7L wrote:
               | Never again. Play is one the worst things I've had to
               | work in. Too much scala when you're just trying to Java.
        
               | ofrzeta wrote:
               | vert.x has unfortunately reduced the support of JVM
               | languages to Java, Kotlin and Groovy. No longer any Scala
               | support, also no support of Javascript.
        
               | listenallyall wrote:
               | Or http4k, which implements "server as a function" and is
               | fantastic for an API backend, with lenses/contracts,
               | auto-serialization on top of your choice of
               | Kotlinx/Gson/Moshi/Jackson, nested routing, so much more.
        
             | ta988 wrote:
             | It depends on your needs I guess. Not all API can be
             | handled by just a few classes. If your plan is to maake a
             | microservice that expose a single value, yes spring boot is
             | likely overkill. But when you have complex models with
             | runtime configuration and profiles and so on... Maybe we
             | need to specify what we are really talking about when we
             | say API. For some it just means a partial implementation of
             | REST.
        
               | BoorishBears wrote:
               | Who said anything about a few classes?
               | 
               | How does using Ktor preclude one from using anything you
               | just described?
               | 
               | Lol just using Koin alone would bring every thing you
               | just described, with the added benefit of not delving
               | into XML files.
               | 
               | Really some people are just married to the mentality of
               | "If it's not on the feature list, I guess you can't do
               | it". I believe in using focused tools that excel at
               | specific things. Ktor lets you do that.
        
               | shock-value wrote:
               | Spring (and particularly Spring Boot) requires no XML for
               | configuration -- everything can be done with annotations
               | and plain Java (or Kotlin).
        
               | BoorishBears wrote:
               | The canonical way to use Profiles, even with Kotlin is
               | with your Maven XML or a web.xml
               | 
               | You can set them up other ways, but it just ends up
               | making a lot of sense to define them there.
               | 
               | To be fair, Ktor is pretty similar with the
               | "application.conf" if you use the built-in Profiles
               | equivalent:
               | https://ktor.io/docs/configurations.html#hocon-overview
               | 
               | I just prefer that if I'm using DI, the concept of
               | environments be handled by DI. Scoping is what DI does
               | best after all...
        
         | vikingcaffiene wrote:
         | I've been writing Kotlin professionally for the past 2 years.
         | I'd highly recommend it as a worthy successor to Java. It's
         | very powerful and thoughtfully designed. Java just feels so old
         | and clunky after using it.
         | 
         | I've not had the pleasure but I hear Scala is great too.
        
           | pjmlp wrote:
           | So is there a Kotlin Virtual Machine already available?
        
         | lordnacho wrote:
         | I'm doing a kotlin project. You won't find it hard or
         | unfamiliar if you're used to Java. You still got gradle, and
         | you still can use whatever java lib you want. It just feels
         | much nicer in kotlin. Just jump into it, you can swap back if
         | it doesn't suit you.
        
           | brabel wrote:
           | I've been using Kotlin in the backend since 1.0 (4 years
           | now??) and it's great, but it does have a few small
           | annoyances. We still have most of our codebase in Java and
           | routinely, we create new Java code instead of Kotlin for
           | everything, interestingly enough (mostly because when a
           | module is already written in Java, it's mostly a source of
           | confusion to add a few Kotlin files - so we tend to only use
           | Kotlin when creating new modules that are fully Kotlin).
           | Also, some of our developers just don't seem to have enough
           | abstraction power for the higher level of code you can write
           | in Kotlin (specially when you start using things like Kotlin
           | builders to make code "prettier", or just abust a little bit
           | the "everything is an expression" feature to completely avoid
           | separete statements - e.g. functions without braces).
           | 
           | People moving from Kotlin back to Java is not unheard of:
           | https://blog.allegro.tech/2018/05/From-Java-to-Kotlin-and-
           | Ba...
        
         | crossroadsguy wrote:
         | Kotlin outside of Android is still a fancy new thing. I am not
         | commenting on its capability but the trend.
         | 
         | (On Android however it seems it's pretty much the only thing
         | now. I am finding it the hard way now when I am looking for a
         | job after staying on a project too long where things are still
         | 98% Java)
         | 
         | It's an amazing language. Just try not to write "Java code" (as
         | in the Java way) in Kotlin (like many Android devs I see
         | doing).
        
         | sorokod wrote:
         | I work in a fintech company, most of our backend is in Kotlin
         | with "legacy" functionality in Java.
         | 
         | Can't think of a single developer that would choose Java over
         | Kotlin.
        
           | chrisseaton wrote:
           | I'd choose Java over Kotlin. The benefits of Kotlin seem
           | minor - mostly syntactic sugar - and the tooling is more
           | limited than Java. They seem to solve problems with kludges
           | (like their coroutines are really just state machines in JVM
           | bytecode, which creates issues like irreducible control-flow)
           | rather than properly engineering solutions like Java try to
           | do.
        
             | dbsmith83 wrote:
             | How is the tooling more limited? I have never had a problem
             | using any java library/framework with Kotlin.
        
             | peheje wrote:
             | But... When Java gets "properly engineered solution" for
             | async code... Kotlin got it as well!
        
               | chrisseaton wrote:
               | So why bother using Kotlin?
               | 
               | Seems like it fixes trivial things (makes simple classes
               | a bit more terse) but retains the more fundamental
               | problems and hangs on for Java to actually fix those.
        
               | listenallyall wrote:
               | If Kotlin's only improvement over Java were its scope
               | functions, that alone would be an overwhelmingly good
               | reason to migrate. Scope functions are _awesome_ , cannot
               | stress that enough.
               | 
               | Kotlin syntax makes writing functional code beautiful and
               | simple... map and fold and filter are so much easier to
               | write than in any other language that also have the same
               | functions, such as JS. Again, that alone would be enough
               | to migrate.
               | 
               | But there are still so many more simple, but incredibly
               | useful functions like SubstringAfterLast which takes a
               | nasty, ugly Split function into a beautiful, precise line
               | of code. Just one example of many.
        
               | pjmlp wrote:
               | import static
        
               | The_Colonel wrote:
               | Kotlin fixes just trivial things - like nullability for
               | example. Java still doesn't have a good solution, only
               | about 5 bad ones and nothing is in sight. It even looks
               | like Java designers simply don't consider it a problem
               | anymore ...
               | 
               | Instead, they focus on things like value types. Which are
               | definitely cool, but they don't actually solve any of my
               | problems. Typical business apps written in Java don't
               | suffer from performance issues, they suffer from
               | (accidental) complexity explosion and subsequent buginess
               | (of which NPEs is a symptom).
        
               | erik_seaberg wrote:
               | When teams go so far as to consider alternatives to Java,
               | memory footprint and poorly tuned GC are typical reasons.
        
               | dbsmith83 wrote:
               | It's way more than terse classes. The syntax everywhere
               | is cleaner. Higher order functions look so much nicer.
               | Using val/var is superior to having to remember to write
               | 'final' all the time. Kotlin also handles nullability way
               | better. Ah, also, default arguments for
               | constructors/methods. These features prevent a lot of
               | developer mistakes, and thus better code is often
               | achieved.
               | 
               | Also, Kotlin usually forges ahead on features, and the
               | Java is playing catch up. Take data classes for instance.
               | If anything it seems like Kotlin gave Java a good kick in
               | the pants to get it to start developing faster and adding
               | modern language features.
        
               | pjmlp wrote:
               | Not at all, because Kotlin wants to take it all, so they
               | need to make the choice if they want to expose JVM
               | features, or keep the language portable across all
               | platforms that JetBrains wants to target with Kotlin.
               | 
               | A good example is Kotlin/Native, by choosing a memory
               | model incompatible with JVM code they failed, and were
               | forced to go back into the drawing board for
               | Kotlin/Native with a proper tracing GC.
        
               | balfirevic wrote:
               | If I were to use Kotlin server-side on JVM and didn't
               | care about portability to other Kotlin platforms, could I
               | not just use JVM green threads?
        
               | pjmlp wrote:
               | Depends on how Kotlin decides to expose them at the
               | language level.
               | 
               | For example, you need special syntax to use SAM types and
               | Kotlin cannot use all use cases from interfaces with
               | default methods.
               | 
               | That is the thing with the _Java_ Virtual Machine, the
               | bytecodes and runtime are designed for Java, all guest
               | languages have to pretend to be Java.
               | 
               | Just disassemble the amount of boilerplate generated by
               | the Kolin compiler.
        
               | vbezhenar wrote:
               | This is not always the case. One example is checked
               | exceptions which are purely Java thing and do not exist
               | in JVM (outside of metadata). That always amused me, it's
               | like a switch to remove checked exceptions from language,
               | you can turn it any time without backward compatibility
               | issues.
               | 
               | Another example is inner classes. Inner class can access
               | private fields of outer class in Java. But in JVM there's
               | no inner class concept, so compiler generates synthetic
               | accessors for outer class private fields and inner class
               | uses those methods to access private fields. That was
               | fixed recently, though, but it was the case for many
               | decades.
               | 
               | Also I remember some funny bytecode with try-finally, I
               | think it's implemented with gotos.
               | 
               | Of course Kotlin generates a lot more boilerplate, that's
               | for sure.
        
             | sorokod wrote:
             | Just sharing my experience, to each his own.
        
             | balfirevic wrote:
             | How did Java (as opposed to JVM) try to properly engineer
             | solution to the problem coroutines were created to solve?
        
               | jsiepkes wrote:
               | Project Loom: https://openjdk.java.net/projects/loom/
               | 
               | The view being that async-await leads to a "What color is
               | your function" problem (
               | https://journal.stuffwithstuff.com/2015/02/01/what-color-
               | is-... ).
        
               | balfirevic wrote:
               | "As opposed to JVM"
               | 
               | You don't have to convince me that green threads are far
               | superior to async-await - I already believe that.
               | 
               | But that's not something Kotlin (nor Java, on the
               | language level) could have solved.
        
               | chrisseaton wrote:
               | > How did Java (as opposed to JVM)
               | 
               | Well that's the point - they solved it in the JVM not as
               | a kludge of bytecode.
        
               | balfirevic wrote:
               | Well, once that happened Kotlin also gets the solution.
               | 
               | It's rude and unfair to call out a language as "solving
               | the problems with kludges" when they literally could not
               | have done anything better.
        
               | chrisseaton wrote:
               | Anyone can propose changes to the JVM. The Java people
               | did. The Kotlin people didn't. And the Kotlin approach
               | generates bad (irreducible) bytecode.
        
           | pjmlp wrote:
           | Here is one, outside Android, Kotlin is other guest language
           | that will fail to take _Java_ 's place on the _Java_ Virtual
           | Machine.
        
             | jorgemf wrote:
             | Why do you say so?
             | 
             | I do think kotlin isnt only aiming to the Java Virtual
             | Machine, it is mucho more.
        
               | pjmlp wrote:
               | Life experience of seeing guest languages come and go,
               | during the last 30 years, and never succeeding in the
               | goal to replace platform languages.
               | 
               | On the contrary, platform languages slowly acquire the
               | relevant features of the shiny languages, which
               | eventually either fade away or find a niche for survival.
               | 
               | Kotlin will be relevant as long as Android exists, that
               | is all.
        
               | tadfisher wrote:
               | Scala, Clojure, and Groovy are all mature languages that
               | haven't gone anywhere. No one has a goal of replacing
               | Java, and they all benefit from improvements to the JVM.
        
               | pjmlp wrote:
               | Mere blips on the Java eco-system, why do you think
               | Typesafe has pivoted into Lightbend and now also does
               | Java projects?
               | 
               | Gradle and Google choosing it for Android are the only
               | things that keeps Groovy still relevant.
               | 
               | As for Clojure, it is its own thing, plugging into the
               | host platforms.
        
         | vbezhenar wrote:
         | You can't go wrong with either choice. Both languages are
         | mature enough to be used in production. I, personally, would
         | use Java, but that's just my preference.
         | 
         | Actually you don't really need any new features to write useful
         | programs. They might help, but they are not necessary.
         | 
         | My advice would be to learn both languages and use your own
         | judgement which one you would like more.
        
         | johnnycerberus wrote:
         | Kotlin never appealed to backend developers (based on job ads,
         | new open-source projects in the domain). Data pipelines,
         | concurrency and streaming are becoming more and more part of
         | what a backend dev should know. Instead, I've noticed that
         | Scala is used in many systems where Java historically was less
         | ergonomic for the task. Spark, Delta, Deequ, Scio, Finagle,
         | Flink, Kafka, the Typelevel & ZIO ecosystems, Akka are some of
         | the examples. Using Kotlin as a sugary interface to Spring
         | Boot? Maybe for some that would be an incentive.
        
           | jpgvm wrote:
           | Kotlin is taking off on the backend. It took a little longer
           | than some people might have hoped but all the big boys are
           | doing backend development in Kotlin now.
           | Square/Netflix/Uber/Twitter/AirBnB all traditionally Java
           | houses have adopted Kotlin in one way or another.
           | 
           | Scala on the other hand is facing a decline. Less so in Big
           | Data where it is still doing well but I find increasingly
           | it's not being chosen for new backend development.
        
           | kitd wrote:
           | Kafka (or rather Confluent) is actually moving parts of its
           | code base to Java.
        
           | Pxtl wrote:
           | I think a big part of the appeal of Kotlin was that Scala was
           | impractical for use on Android so Kotlin slid in as "the
           | missing pieces" of Java.
        
             | jsiepkes wrote:
             | Yeah also somewhere after Java 7 (I think) Java stagnated
             | because the next version was too ambitious (stuck in
             | development-hell). To get back on track they cut a bunch of
             | features, labelled it Java 8 and moved Jigsaw (the biggest
             | hurdle) to Java 9. After this they also moved to the fixed
             | release cycles.
        
               | pjmlp wrote:
               | Java stagnated because Google torpedoed Sun, left it sink
               | without bothering to own Sun, Oracle was the only one
               | that bothered to keep their buy offer (IBM withdrew
               | theirs), and and to spend a couple of years setting the
               | house straight.
               | 
               | Yet, there are no FOSS language that matches JIT and GC
               | capabilities of the JVM.
               | 
               | Looking forward to the KVM, if Kotlin is so great.
        
             | pjmlp wrote:
             | Because Google as Kotlin's Godfather is stagnating Android
             | Java on purpose, on the proper JVM we don't have such
             | constraints.
        
               | Pxtl wrote:
               | Can't really blame Google for deciding to move away from
               | Java after the Oracle lawsuit.
        
               | pjmlp wrote:
               | Oracle has done the right thing to smash Google's own
               | J++.
               | 
               | Google had a easy way out after screwing up Sun, buy it.
        
         | mraigig wrote:
         | I recommend having a look at http4k as an alternative to Ktor
         | and Spring as well.
        
       | jpgvm wrote:
       | Kotlin is my go-to general purpose language these days.
       | 
       | I still use and enjoy a few others, namely Rust but unless I need
       | something specific I don't generally need to look past Kotlin.
       | 
       | You get the full JVM ecosystem, terse language that supports
       | powerful abstractions and JVM runtime performance/features - i.e
       | threads, debugging, prod tooling.
        
       | hnrodey wrote:
       | Any thoughts on if we are seeing the beginnings of a JetBrains
       | acquisition from Google? There seem to be significant overlap
       | between the JetBrains investments (people capital, intellectual
       | property: IDE, language) and Google significantly using all of
       | these things.
       | 
       | edit: lol @ the down votes
        
         | The_rationalist wrote:
         | Jetbrains has a order of magnitude better internal culture that
         | Google so I hope that never happen. JetBrains is one of the few
         | NO bullshit company that continually refine it's products for
         | improving the user experience.
        
         | ta988 wrote:
         | It is highly unlikely (I hope I'm not wrong). The way Jetbrains
         | is financed and managed, they don't need that and they don't
         | have pressure from any venture capitalists to go anywhere near
         | that. That would also really likely harm their reputation
         | really badly (but I said that of github as well and it was not
         | as bad as I feared, so don't believe everything/anything I
         | say).
        
         | meddlepal wrote:
         | I hope not. I will cry when Google inevitably fucks the product
         | up then closes them down.
        
           | preommr wrote:
           | Does anyone at Google actually care that the company's
           | reputation has become pretty bad?
           | 
           | I know this comment is just a joke, but I think it's an
           | indication of a bigger problem.
        
       | some_anon_dude wrote:
       | > The Foundation secures Kotlin's development and distribution as
       | Free Software
       | 
       | But then...
       | 
       | > The code is distributed under the Apache License, Version 2.0.
        
       | melling wrote:
       | Interesting to watch Kotlin develop.
       | 
       | It came in and filled the niche that i always thought Scala would
       | fill.
       | 
       | I've been doing mostly Swift for the past several years, and i
       | love it.
       | 
       | Scala 3 looks interesting but it seems to be moving slowly.
       | 
       | I look forward to having another Java option if I ever get back
       | to that platform. Java was cool in 1998 but after Swift, I'll
       | need something nicer on the JVM
        
         | ta988 wrote:
         | Coming from Swift, you will not be lost in Kotlin.
        
           | pixel_tracing wrote:
           | Seconding this only thing that Kotlin does not give you is
           | Associated Objects.
           | 
           | You unfortunately cannot add new (stored) properties to
           | existing types like you can in Swift.
        
         | erik_seaberg wrote:
         | I like Scala but it's pretty complicated. I'm hoping Kotlin
         | might be just attainable enough for the masses.
        
       | redwood wrote:
       | Anyone try out https://github.com/realm/realm-kotlin for local
       | state yet?
        
       | maxpert wrote:
       | I've used Kotlin on Server Side in production at a pretty
       | significant scale and I think it's the most underrated thing for
       | people using JVM on servers. I recently had a podcast with one of
       | Spring dev advocates (Josh Long)
       | https://spring.io/blog/2021/02/11/a-bootiful-podcast-doordas...
       | (shameless plug) and brought similar discussion to table. I will
       | seriously urge folks to try it and hopefully foundation will
       | bring more goodness!
        
         | holoduke wrote:
         | We used it for 1 year. Using spring boot framework.
         | Unfortunately we had to ditch it. Issues with multi annotation
         | support. Problems with instant run / partial compile. Slower
         | performance. This was about a year ago. Maybe things have been
         | improved. But we also noted that many outstanding bugs were
         | ignored by the main devs behind kotlin. Did not feel like a
         | mature language. At least not now.
        
           | brabel wrote:
           | We've been using it since 1.0 and I agree with you that
           | there's many rough edges... many projects may never run into
           | them, but like you, we did have these issues you mention...
           | slower performance by the compiler and IDE are very, very
           | noticeable on a large Kotlin project (at runtime, we haven't
           | had many issues - there's only a few cases Kotlin is slower
           | than Java, but you can keep those in mind and avoid them when
           | necessary[1])... one more issue is Dokka (the equivalent to
           | Javadocs for Kotlin). It's still in alpha and it's pretty
           | terrible, if I may say... it generates documentation that
           | requires lots of JS libraries to run, which is just
           | ridiculous. We ended up writing the documentation conversion
           | ourselves instead of using Dokka (this was actually for an
           | Android project - because we hadn't needed to publish docs
           | for backend Kotlin before).
           | 
           | That said: we still enjoy using Kotlin, I just wouldn't ditch
           | Java for it if I had to pick one.
           | 
           | [1] https://sites.google.com/a/athaydes.com/renato-
           | athaydes/post...
        
           | maxpert wrote:
           | What version of springboot you were on?
        
         | randompwd wrote:
         | Have only used Kotlin with Spring Boot for server side REST api
         | and the resulting code was, a lot of the time, very un-
         | digestable. Quite ugly to the eyes.
         | 
         | Looking to give Kotlin another shot for non-Android API
         | consumption and it seems like Ktor is a frontrunner. Looking at
         | Spring WebClient to consume a JSON API makes my eyes hurt
         | compared to other languages.
        
           | dehrmann wrote:
           | > Quite ugly to the eyes.
           | 
           | The companion object makes things like loggers ugly. Skipping
           | parentheses for method calls that take lambdas _can_ be nice,
           | but all it does is safe a pair of parentheses, it makes for
           | inconsistent syntax, and is pretty ugly when the method takes
           | an arg. The lack of implicit upcasting is weird. The set /get
           | sugar is nice, but it looks ugly when it's next to places
           | where it doesn't work.
        
       | yannoninator wrote:
       | Rust, Python and now Kotlin.
       | 
       | Just as PSF promoted Google to visionary sponsor, although I
       | understand Jetbrains, but we see yet again our saviour Google on
       | the board of yet another language, even after Rust formed its
       | foundation.
       | 
       | I guess I have no choice to accept this future we've put
       | ourselves in.
        
         | impulser_ wrote:
         | Well Google does run and control the largest Java platform in
         | the world by far. I think it would be a good thing to have them
         | on your side when you are developing a language that
         | interoperate with Java.
        
           | pjmlp wrote:
           | One would think, yet Android Java is stuck in a Java 8 subset
           | with cherry picked features from OpenJDK.
        
         | blacktriangle wrote:
         | I agree with your general Google paranoia, but in this case I'm
         | okay with it since Google is easily the number 1 user of Kotlin
         | thanks to its roll in making Android development infinitely
         | more productive.
        
           | yannoninator wrote:
           | Jane Street is the No. 1 user of OCaml for a very long time,
           | although sponsoring it, they don't have a board seat on the
           | OCaml Foundation.
           | 
           | You don't need to provide a board seat to any company that
           | tries to throw money at you, just because they use your
           | language.
           | 
           | Just make them a sponsor, and there are examples of this.
        
         | steveklabnik wrote:
         | What is your specific dislike about Google on the Rust
         | Foundation board?
        
           | yannoninator wrote:
           | Steve, I don't understand why Google, Microsoft and AWS et.
           | al are on a board of this new foundation. Who had a say on
           | this decision?
           | 
           | And the special guest is Huawei as well just because they use
           | Rust in some way.
           | 
           | I'd rather have them sponsor Rust without giving them too
           | much control by placing them on the board.
        
             | steveklabnik wrote:
             | The foundation was created as a project of the core team.
             | Nobody was a "special guest." All parties agreed to the
             | terms. That's what the founders of an organization does.
             | 
             | Again, specifically: what control are you worried about? I
             | suspect that you think the foundation has powers it does
             | not have.
        
               | yannoninator wrote:
               | It is the structure that I am concerned about.
               | 
               | Again, I'd rather have them just sponsor Rust, why wasn't
               | a gold or platinum sponsorship like structure considered
               | without placing them on the board of directors.
               | 
               | How about a corporate membership without voting rights?
        
               | steveklabnik wrote:
               | Right, but the structure is a secondary concern, in that
               | you're concerned about the structure because it enables
               | particular actions. What kind of vote are you worried
               | about?
        
               | yannoninator wrote:
               | > Right, but the structure is a secondary concern,
               | 
               | If it was the primary concern we wouldn't be having this
               | conversation, lots of foundations have this structure.
               | 
               | Right now, it is more likely that Facebook would get on
               | the board before I can even donate.
        
               | steveklabnik wrote:
               | Okay. I still don't understand specifically what your
               | concern is. I would love to understand, but I'll drop it.
               | Given the scope of the foundation and what it is and is
               | not in charge of, I find this attitude _very_ confusing.
        
         | high_density wrote:
         | well Google's using all three in different ways...
         | 
         | and another trend on prog. langs: they're becoming more and
         | more similar feature-wise (eg. pattern matching)
        
           | yannoninator wrote:
           | > well Google's using all three in different ways...
           | 
           | So that justifies giving them a seat at the board of
           | directors and not just a sponsorship?
           | 
           | Apple and Facebook both use Rust but I don't see anything
           | about them being on the board (at least Facebook for now),
           | the least I expect is sponsorship.
        
             | ta988 wrote:
             | Google contributes a lot to Kotlin though. So they are not
             | just sponsors.
        
               | yannoninator wrote:
               | Interesting perspective, so just like Rust then? Seems
               | like Google can just buy board seats then.
        
               | ta988 wrote:
               | If you mean by dedicating workforce (which costs money,
               | and a lot for them because of their salaries policies)
               | they are buying a seat? Yes. The same way a major
               | contributor (not just code, but doc, funding, community
               | building...) to a FOSS project often has more power on
               | the decisions than users.
               | 
               | Now I would be unhappy to see a company that just pours
               | millions in a project, gets to take decisions but doesn't
               | do anything else to make the project better. But I don't
               | believe that's the case here.
        
               | yannoninator wrote:
               | You can do all of this without getting a board seat.
               | 
               | It seems we are all OK with allowing this to happen, but
               | we shall see.
        
             | chuckSu wrote:
             | We get it... you hate google
        
             | dieortin wrote:
             | I'm curious, what does Apple use Rust for?
        
               | steveklabnik wrote:
               | They were hiring for their storage and networking groups,
               | but that's all we know.
        
         | ta988 wrote:
         | I understand that side (and I'm personally against Google's
         | behavior, hegemony and influence on almost everything). But
         | Google is one of the few companies that gives back to projects
         | they use. You can't say that of many other companies that use
         | tools and make sure they never contribute back (either
         | financially or as code). As long as they don't put their adcrap
         | in any of those languages or the things around them...
        
           | yannoninator wrote:
           | > But Google is one of the few companies that gives back to
           | projects they use.
           | 
           | Apple gives back to open source projects. Isn't Swift open
           | source as well as LLVM and Webkit?
           | 
           | Makes sense because they made them and a long time user of
           | them.
        
             | ta988 wrote:
             | I didn't say some other companies don't give back either
             | 
             | If you compare the number of companies using a project and
             | how many contribute, you will likely only need one hand to
             | count the later...
        
               | yannoninator wrote:
               | I don't think this is a good thing in the long term, a
               | conflict of interest can arise, then Google would pull
               | out.
               | 
               | But then again, I guess I have no choice to accept this
               | future we've put ourselves in.
               | 
               | At least I can as an individual give back to Kotlin, no
               | wait...
        
             | arusahni wrote:
             | WebKit has to be open source because it's a KHTML fork.
        
               | cwzwarich wrote:
               | This isn't actually true. KHTML is LGPL 2.0, so you can
               | release source code for the pieces you modified and
               | binary blobs for the rest. WebKit proper (as opposed to
               | WebCore, which was based on KHTML, and JavaScriptCore,
               | which was based on KJS) was originally not open source.
        
               | arusahni wrote:
               | Interesting. Thanks for the correction!
        
             | nolok wrote:
             | I'm not sure why the victim complex about Apple in your
             | comment, he said too few companies do it and that remains
             | true whether or not Apple is in that group. In fact that
             | conversation has nothing to do with Apple.
        
               | yannoninator wrote:
               | > I'm not sure why the victim complex about Apple in your
               | comment, he said too few companies do it
               | 
               | Sure it's all good when companies fund projects they use,
               | but that does not mean they should instantly get a board
               | seat.
               | 
               | It makes sense why Jane Street sponsors OCaml, does not
               | mean they instantly get a board seat. I don't see Jane
               | Street sponsoring RISC-V and getting a board seat do I?
               | 
               | And it doesn't make sense to do so.
               | 
               | I find is suspicious for companies to join or create a
               | foundation and get automatically propped up on the board,
               | especially Google.
               | 
               | It's going to be much harder to remove them if your
               | values are not aligned with theirs or you dare criticise
               | them.
        
               | no_wizard wrote:
               | Google is highly invested Kotlin and it's success with
               | Android and what I'm certain is the fact that they have
               | huge Java code adds that I could see them having real
               | value in slowly converting to kotlin and allowing Kotlin
               | to be the first class choice where Java would be.
               | 
               | Honestly I just don't see it here. Google's marketplace
               | ambitions have not surfaced in these foundations. I would
               | Love a real tangible counter example of Google leveraging
               | their seat on a language committee to control the
               | language in such a way it only furthers Googles
               | interests. Even with the browser I don't see them
               | outright controlling tc39 or WHATWG/W3C or the CSS
               | working group. Otherwise HTML imports would be a thing
               | right now (and arguably they should be but that's another
               | debate)
               | 
               | I don't defend what they're doing with Chrome the product
               | but they so far have seemed to be pretty sane with
               | standards bodies
               | 
               | The thing about Google or any entity of their size is
               | that they're huge and lots of different types of people
               | work there, and I'd wave most aren't malicious
               | 
               | That doesn't handwave legitimate complaints here and I
               | don't like Google have arbitrary outsized influence
               | either but I don't think that's the case with these
               | commuters/foundations
        
               | yannoninator wrote:
               | > Google is highly invested Kotlin
               | 
               | I don't see what benefit of putting them on the board
               | would give them, same thing with Rust, just because it's
               | used on Android? Was a gold sponsorship not enough?
               | 
               | > Honestly I just don't see it here.
               | 
               | You're not looking hard enough, they are bearing
               | 'generous' gifts to these foundations, Example: OpenAI
               | was all about openness weren't they?
               | 
               | But a big somebody bared a huge gift and so much for
               | 'Open AI'.
               | 
               | Don't you think Google and others like them are doing the
               | same thing such that they are getting you to use their
               | products through their 'donations'?
               | 
               | > That doesn't handwave legitimate complaints here and I
               | don't like Google have arbitrary outsized influence
               | either but I don't think that's the case with these
               | commuters/foundations
               | 
               | Again we shall see, but I am seeing this everywhere and I
               | am not happy with the shift from community to corporation
               | led open source projects. A sponsorship should be enough
               | but they want more as always.
        
               | no_wizard wrote:
               | I can understand caution and concern and it's healthy to
               | have it.
               | 
               | That said, I'm unable to think of or find obvious
               | examples of them having a track record of using
               | foundations like this for their own agenda at the expense
               | of the community, language or only to further their own
               | ends. Even with the browser stuff there's Chrome the
               | product which makes a lot of changes that does hurt the
               | community but then there's Googles representation on tc39
               | and in the web standards groups. With that I haven't
               | found evidence of malpractice or foul play. Please give
               | me some concrete evidence that they have a history of
               | this as I'm not finding it.
               | 
               | Doesn't mean that as a whole these companies get a pass
               | for Bad behavior, I think a key to a great argument
               | against something is to be able to scope what it does and
               | doesn't do, so I hate to say they are doing this for
               | malicious reasons only to be wrong (and again I'm not
               | seeing evidence) and undercutting more legitimate
               | arguments. Fundamentally that's the arching issue we end
               | up with by just making assumptions without evidence at a
               | minimum
        
               | ta988 wrote:
               | Kotlin is not a community led project. It has always been
               | a Jetbrains led project, and that move to a foundation is
               | a way to try to distribute responsibilities a bit more.
               | At least thats how they sell it.
        
       | oceankid wrote:
       | Must be feeling some pressure because they've redesigned that
       | homepage three or four times in a very short time.
        
         | ta988 wrote:
         | Yes they are working on a redesign (logo, graphic chart...) I
         | guess they are trying things out.
        
       | guytv wrote:
       | I have been programming for 37 years now.
       | 
       | Kotlin is just a joy to read and write.
       | 
       | Usually when working on a new non-trivial task, I first think of
       | the solution, then write it down in pseudo code.
       | 
       | Reading a Java implementation of my original pseudo code - I
       | sometimes feel the actual solution hides below layers of code.
       | The solution is still there, but it is hard to see it.
       | 
       | When comparing the resulting Kotlin code with the original
       | solution written in pseudo - Ir can still be seen clearly.
       | 
       | Kotlin does not get in the way, but still allows me to use strong
       | typing and compile time checks to make sure my code is solid and
       | stable without loosing readability.
       | 
       | It is just great joy, fun, using it.
        
         | TulliusCicero wrote:
         | 100% agreed. I use Java for work, used to use Python for little
         | side projects, but started using Kotlin for side projects
         | recently. It feels like the best of both worlds to me: the
         | strict structure of Java, with the ease of writing new code of
         | Python.
        
       | brabel wrote:
       | This is great for Kotlin! But I need to make an observation about
       | Google...
       | 
       | They're also co-founders of the Rust Foundation[1], the major
       | member of the select group of companies at the table at WHATWG[2]
       | (which amongst other things decide on the future of web
       | technologies, including JavaScript) due to their browser's market
       | share, and a "visionary sponsor" of the Python Foundation[3].
       | 
       | They also develop a few programming languages themselves, like Go
       | and Dart (not to mention their polemic Java implementation),
       | besides their own OS (Android, Fuchsia).
       | 
       | A company as large as Google is kind of expected to be using
       | every technology in existence, but I still find it interesting
       | how they're also making sure they also play a major role in the
       | evoluation of such technologies by being part of any Foundation
       | that might have any relevance whatsoever (if not via their own
       | languages, at least by exerting influence on everything).
       | 
       | [1] https://foundation.rust-lang.org/posts/2021-02-08-hello-
       | worl...
       | 
       | [2] https://en.wikipedia.org/wiki/WHATWG
       | 
       | [3] https://news.ycombinator.com/item?id=26121937
        
         | vram22 wrote:
         | What is your point? Maybe you need to make it more clear.
         | Note:I am neither pro nor con Google, although I have both
         | praised them and critized them in the past, for different
         | things.
        
         | nindalf wrote:
         | I think we have to understand that Google is a large company
         | filled with people with technical skills. These people are
         | rewarded for contributing to open source. So they do. That's
         | it. It is entirely possible that maybe Google employees might
         | want a feature that others don't, but I haven't seen that
         | evidence.
         | 
         | In 10 years of developing Go, I know of only 2 things that the
         | community has disagreed on with the Go team - package
         | management and generics. One is already fixed and the other
         | will be in a year. Nothing I can think of wrt their
         | contributions to Rust, Kotlin, C++, Python etc.
         | 
         | No one has ever articulated why it's a bad thing that Google
         | sponsors open source development. If someone could articulate
         | specific reasons, that'd be great. But this kind of FUD comment
         | ("hmm, they sponsor an awful lot don't they") doesn't add much.
        
           | yannoninator wrote:
           | This does not warrant them giving them a board seat just
           | because they have cash.
           | 
           | Go is moot point because they control that language anyway,
           | people have no say on it except people who work at Google.
           | 
           | No surprise that you cannot donate any money there.
        
             | nindalf wrote:
             | Foundation needs money (to hire employees) and resources
             | (server time and bandwidth) to run. Sponsors of the
             | foundation will fund this. It's as simple as that.
             | 
             | Point out where this arrangement _hasn 't_ worked well.
             | Otherwise you're just spreading FUD.
        
               | yannoninator wrote:
               | Never said I was against sponsorship, just don't put them
               | on the board of directors, a gold/plat sponsorship
               | without votes will do.
               | 
               | Examples of foundations and centers that do this are R,
               | OCaml, Zig and Ruby. All successful.
               | 
               | > Point out where this arrangement hasn't worked well.
               | Otherwise you're just spreading FUD.
               | 
               | W3C and DRM, do you know who voted for this and who is on
               | the board of directors of the W3C?
               | 
               | If you need some time I'll wait.
        
           | mrmonkeyman wrote:
           | This lacks nuance. You ignore the effect they have on the
           | ecosystem as a whole. Mentioning the "Go community" and their
           | "agreement" of Google's decisions without acknowledging this
           | is disingenuous at best. They have already swayed and
           | gatekept large swaths of the (web)development "community" by
           | their decade-long dominance and no one can make an impactful,
           | meaningful decision in that field without their implicit
           | approval. Their dominance is felt best by the way they
           | control the conversation i.e. what we don't talk about - i.e.
           | the web among other things they touch sucks, continues to
           | suck and it is going to get worse and less free and they are
           | significant negative contributers. So yeah, I'd rather see
           | them cut into pieces.
        
             | nindalf wrote:
             | Your comment lacks any content. You make vague claims of
             | "effect on the ecosystem" without mentioning what that is.
             | Give an example. Can people not create web frameworks? Can
             | people not create products hosted on the web? Can people
             | not use AWS or Azure for all their computing needs?
             | 
             | You can't just claim "everything they touch sucks" without
             | a single example or evidence to back it up. You look like a
             | hater.
        
               | dang wrote:
               | Whoa, please don't post in the flamewar style to HN and
               | please don't cross into personal attack. Those things
               | aren't allowed here.
               | 
               | https://news.ycombinator.com/newsguidelines.html
        
               | cnl wrote:
               | The pro-Googlers are out in force today, also in the
               | "visionary" Python topic.
               | 
               | FYI, often it is not possible to mention specifics
               | because "open" source projects tightly control member
               | opinions these days.
        
               | smoldesu wrote:
               | A lot of people here aren't necessarily pro-Googlers, but
               | rather open-source contributors who want to secure a
               | future for themselves. That's not a bad thing, and
               | Google's partnership with open-source has been mostly
               | benevolent. People are quick to point to the "killed by
               | Google" argument, but how is Google going to kill an open
               | project? If they stop funding it and nobody takes up the
               | mantle of maintaining it, maybe it's not actually that
               | useful anyways. In either case, you still have the option
               | to maintain the code yourself.
        
               | TulliusCicero wrote:
               | > The pro-Googlers are out in force today
               | 
               | This is a good way to categorically dismiss everyone with
               | an opposing view, without the work of actually coming up
               | with an argument.
        
               | nindalf wrote:
               | Thanks for the ad hominem attack. FYI, I have no google
               | stock, never worked for google, have never contributed to
               | a google open source project. If they're supposed to be
               | paying me for pointing out common sense on this thread
               | ... they're late on their payment.
        
               | cambalache wrote:
               | > Thanks for the ad hominem attack. FYI, I have no google
               | stock, never worked for google, have never contributed to
               | a google open source project. If they're supposed to be
               | paying me for pointing out common sense on this thread
               | ... they're late on their payment.
               | 
               | If this is true (I doubt it) it is even sadder
        
               | dang wrote:
               | Please don't break the HN guidelines like this. We're
               | trying for something quite different here.
               | 
               | If you wouldn't mind reviewing
               | https://news.ycombinator.com/newsguidelines.html and
               | taking the intended spirit of the site more to heart,
               | we'd be grateful.
        
         | alexfromapex wrote:
         | Google needs a real competitor, I feel like people don't try to
         | create search engines because it's such a monolithic task and
         | Google is so far ahead
        
           | MikeDelta wrote:
           | I read an article in the FT recently saying that a new batch
           | of startups is looking at competing with Google in the
           | search-engine field [0].
           | 
           | [0] https://www.ft.com/content/24efc152-a65d-4c48-9032-ee349a
           | 2c8...
        
             | MikeTheGreat wrote:
             | Sorry for the off-topic post:
             | 
             | Is there a good way to get non-paywalled access to this? It
             | says I can read it if I register but today that's just one
             | step too many for me ("_Another_ account? Really? _sigh_ "
             | :) )
             | 
             | I'm kinda curious to know why anyone is trying to start a
             | new search engine(s), given both Google and Bing.
             | 
             | (But apparently not curious enough to give my email address
             | to Yet Another Website :) )
        
               | piokoch wrote:
               | Copy title, paste into search engine box and access from
               | the search engine list. It seems FT wants to get the
               | traffic and the indexing more than money from
               | subscription.
        
             | heavyset_go wrote:
             | How many of these startups plan to actually compete instead
             | of planning to be bought up by Google or Microsoft?
        
         | dragonwriter wrote:
         | > A company as large as Google is kind of expected to be using
         | every technology in existence
         | 
         | Moreover, as a public cloud provider, they are ultimately
         | expected to be supporting virtually every technology in
         | existence. Amazon (explicitly as AWS, usually) and Microsoft
         | have pretty similar degree of foundation involvement
        
         | yannoninator wrote:
         | Sure, I do welcome the language getting support however, I
         | can't help but think it may be to do with them being fined by
         | Oracle in that lawsuit costing Google billions.
         | 
         | But who knows, we are not allowed to ask these questions, just
         | like why DRM was allowed into the web standard and W3C kept the
         | votes secret.
         | 
         | I don't like the route we are heading.
        
       | tibiahurried wrote:
       | Tried Kotlin, honestly I was not impressed. Tools (maven/gradle)
       | wasn't as straight forward to setup as one would have expected. I
       | am not impressed with the language itself and I had issue with
       | conflicting libraries and kotlin versions.
       | 
       | I switched back to modern Java and did not regret it.
       | 
       | Java is catching up at a fast pace, I don't think Kotlin will
       | ever replace Java or see mass adoption.
        
         | TulliusCicero wrote:
         | Kotlin has already pretty much replaced Java for Android devs.
         | I see it doing something similar to Java use more generally
         | (albeit more slowly than it did with Android).
        
         | aweiland wrote:
         | It's 3 lines in a build.gradle(.kts) to get running. We've been
         | using it in production for 5 years without any issues you are
         | describing.
        
       | lokedhs wrote:
       | I started using Java in the 90's and worked for Sun back in the
       | day, so I have a reasonable amount of experience with it.
       | 
       | Kotlin is a much better Java, and these days if I need to use the
       | JVM, I will use Kotlin.
       | 
       | However, I do feel that there is a huge missed opportunity in
       | making something that is not just a better Java, but a better
       | language. Kotlin has a lot of annoying limitations, almost all of
       | which are there because the JVM doesn't allow better
       | implementations using first-class JVM functionality.
       | 
       | One of my favourite examples is multimethods which would be an
       | amazing improvement. However, the JVM can't do dynamic dispatch
       | on multiple arguments, so Kotlin will never get it. Sure, if they
       | implement it, calling Kotlin from Java would be more complicated,
       | but that really shouldn't restrict how the language evolves.
       | 
       | Another thing I'd like to see changed is better support for
       | DSL's. Some nice stuff has been done with the limited facilities
       | that are available, but it always seems like I'm fighting the
       | language when making DSL's. As someone who writes a lot of Lisp,
       | I'd really like to see a macro system.
        
         | _old_dude_ wrote:
         | > JVM can't do dynamic dispatch on multiple arguments
         | 
         | It can since Java 7, the instruction invokedynamic was added
         | for this kind of stuff.
         | 
         | The implementation for Pattern Matching (the project Amber) [1]
         | will use the very same instruction.
         | 
         | [1] https://cr.openjdk.java.net/~briangoetz/amber/pattern-
         | match-...
        
           | brabel wrote:
           | Groovy has done dynamic dispatch this way for a decade now.
        
             | pjmlp wrote:
             | And if it wasn't for Gradle, it would have been forgotten
             | for now.
             | 
             | The language that was supposed to replace Java in JEE and
             | Spring.
        
               | the_only_law wrote:
               | What ever happened to it? I recall Groovy and Grails
               | being pretty big in the Java world several years ago.
        
               | pjmlp wrote:
               | The interest died off, JUGs stop talking about it and
               | everyone went back to Java, while some of us got money to
               | port those projects back to Java.
               | 
               | Had it not been for Gradle, and there would be hardly a
               | reason to learn it in 2021, other than historical
               | interest.
        
         | jorblumesea wrote:
         | I actually think that once you have Kotlin on top, it might
         | open the door to another VM or bytecode generator. What's the
         | point of having that abstraction if you're so tied to some
         | other company VM?
        
         | Erlich_Bachman wrote:
         | It sounds like you are describing Groovy (which was mature even
         | before Kotlin BTW).
        
         | dehrmann wrote:
         | > Another thing I'd like to see changed is better support for
         | DSL's
         | 
         | I keep waiting for a good solution for SQL in Java (or another
         | language) that isn't a builder or a string with templating. I
         | don't like what React does architecturally, but JSX shows how
         | mixing languages in an elegant-ish way can be huge.
        
           | chin7an wrote:
           | Checkout jooq(1) for a SQL DSL in Java. I've used it with
           | MySQL and love it. Trying to convince my employer for the
           | paid version with RDS.
           | 
           | [1] http://www.jooq.org/
        
             | Retozi wrote:
             | we use jooq extensively it's probably the most valuable
             | tech in our backend.
             | 
             | Also among various other tech stacks I've never seen
             | something that hits the sweet spot between "plain sql" and
             | "advantages of ORM-stuff" as well as jooq
        
               | listenallyall wrote:
               | Also, props to the primary developer Lucas, who directly
               | replied to my questions within a day, twice
        
           | mirekrusin wrote:
           | String templating elevated to "tagged templates" [0] which
           | dispatches template on your own function is suprisingly
           | acceptable solution. I'm using it to drive mssql sql
           | generation [1] and it works really well with type system
           | around combinators. It's perfect, extremely lightweight way
           | to achieve embedded dsl like experience.
           | 
           | [0] https://developer.mozilla.org/en-
           | US/docs/Web/JavaScript/Refe... [1]
           | https://github.com/appliedblockchain/tsql
        
           | brabel wrote:
           | You and the PC probably would be happy with Groovy, specially
           | with them adding a SQL DSL now: https://github.com/apache/gro
           | ovy/blob/master/subprojects/gro...
           | 
           | Groovy DSLs are much better than Kotlin's.
        
             | dehrmann wrote:
             | Gradle, perhaps unfairly, left me not liking Groovy.
        
           | vbezhenar wrote:
           | PL/SQL?
        
           | pjmlp wrote:
           | We had that in the past, SQLJ
           | 
           | https://en.wikipedia.org/wiki/SQLJ
        
       | [deleted]
        
       | anonyfox wrote:
       | Next entity for the killed-by-google-graveyard?
       | 
       | Joke aside, seems that kotlin is a niche player and will remain a
       | better Java until something like Rust eventually takes over the
       | enterprise market.
        
         | The_rationalist wrote:
         | Kotlin on the server is growing in popularity and ecosystem,
         | just a week ago Netflix open sourced a new Graphql client. Also
         | Pivotal (the company behind Spring boot) is investing a lot in
         | Kotlin. To have tried many language on the server, Kotlin is a
         | gift and has made me as a developer both more productive and
         | happier! It truly is a state of the art language in ergonomics
         | that everybody should give a try
        
           | pjmlp wrote:
           | Almost 10 years ago Pivotal was doing exactly the same with
           | Groovy, Scala and Clojure, where are Spring
           | Groovy/Scala/Clojure 10 years later?
        
             | ta988 wrote:
             | I don't think any of these language efforts went anywhere
             | near the support Kotlin now has in Spring. Doesn't mean it
             | will not fail, but it is already further than any other..
        
               | pjmlp wrote:
               | Sure they were, Pivotal was screaming across all winds on
               | Java conferences, just like they are doing nowadays with
               | Kotlin.
               | 
               | They are just betting on a new horse after the old ones
               | failed to win the races they were set off to.
               | 
               | I kept being downvoted when I talked about S4TF going
               | nowhere and the news today prove many of us were right
               | about it.
               | 
               | Similarly I will give about 5 years time for Kotlin
               | fashion to die everywhere outside Android, this assuming
               | that Fuchsia won't eventually become the new darling.
               | 
               | It is quite telling that Google's own business units like
               | Ad Words and Google Pay rather go with Flutter, and write
               | blog posts about it, instead of adopting KMM.
               | 
               | Jetpack Composer is a political answer to Flutter.
        
               | johnnycerberus wrote:
               | I remember many years ago when Pivotal's website was
               | featuring a module for Spring Scala saying something
               | about concise API and other functional buzzwords. The
               | same for Groovy, earlier.
        
         | goto11 wrote:
         | Rust will never take over the enterprise market from Java or
         | Kotlin. It is a language for completely different use cases. I
         | it more of a competitor to C++.
        
         | wffurr wrote:
         | Android development is a huge "niche".
         | 
         | I don't see how Rust displaces Java or Kotlin. It's very
         | different with different use cases that it's suited for and
         | different strengths and weaknesses.
         | 
         | Kotlin also seamlessly inter operates with Java, which is a big
         | deal for any company with a large existing Java code base,
         | which are legion.
        
           | jswizzy wrote:
           | Yep and with Kotlin and Swift having 90% of the same
           | paradigms it's easy to switch between the two without having
           | to think in contrasting paradigms.
        
         | ta988 wrote:
         | Kotlin is slowly getting in the industry as well. But really
         | comparing Rust and Java (meaning the JVM, its languages and all
         | the libs and tools) is not fair. They have different targets
         | and respond to different needs. Of course, like everything,
         | there are problems where their capabilities overlap and they
         | would both work really well. But I have trouble believing this
         | "new language that will rule them all" idea. We didn't really
         | see that happen anywhere (or maybe we did and I'm missing an
         | example of that).
        
           | pjmlp wrote:
           | Kotlin is meaningless outside Android development.
           | 
           | Kotlin/Native is never going to be a match for other native
           | languages, as its reboot by choosing an incompatible memory
           | model with JVM languages has proven.
           | 
           | While on the JVM, just like trying to replace C on UNIX,
           | JavaScript on the browser, it is just another guest language
           | dancing to Java tunes.
           | 
           | Just another one to share seats between Beanshell, jTCL,
           | Jython, JRuby, Scala, Clojure, Groovy, Ceylon, XTend, without
           | big daddys' help to force adoption down developer throats
           | like they are doing on Android.
        
       | The_rationalist wrote:
       | If you missed it, the latest investment from Google to the Kotlin
       | compiler is the KSP plugin: https://github.com/google/ksp
        
         | AndrewDucker wrote:
         | I didn't even know Kerbal Space Program allowed that kind of
         | plugin!
        
       | throwawinsider wrote:
       | Regarding Google sponsoring every language, it's a well-known
       | practice that Wall Street banks are the main donnors of both
       | Democrats and Republicans.
       | 
       | No better way to eliminate competing platforms than buying them
       | up.
        
         | eeZah7Ux wrote:
         | What's next, google gets the majority of the browser market
         | while also becoming the biggest donor of mozilla?
         | 
         | oops...
        
       ___________________________________________________________________
       (page generated 2021-02-13 23:01 UTC)