15 ms·
The Kotlin Foundation
- yannoninator 6y agoRust, 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.
- high_density 6y agowell 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 6y ago> 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 6y agoGoogle contributes a lot to Kotlin though. So they are not just sponsors.
- yannoninator 6y agoInteresting perspective, so just like Rust then? Seems like Google can just buy board seats then.
- ta988 6y agoIf 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 6y agoYou 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.
- dieortin 6y agoI’m curious, what does Apple use Rust for?
- steveklabnik 6y agoThey were hiring for their storage and networking groups, but that’s all we know.
- chuckSu 6y agoWe get it... you hate google
- ta988 6y agoI 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 6y ago> 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 6y agoI 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 6y agoI 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 6y agoWebKit has to be open source because it's a KHTML fork.
- cwzwarich 6y agoThis 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.
- blacktriangle 6y agoI 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 6y agoJane 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 6y agoWhat is your specific dislike about Google on the Rust Foundation board?
- yannoninator 6y agoSteve, 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 6y agoThe 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 6y agoIt 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 6y agoRight, 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 6y ago> 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.
- impulser_ 6y agoWell 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 6y agoOne would think, yet Android Java is stuck in a Java 8 subset with cherry picked features from OpenJDK.
- oceankid 6y agoMust be feeling some pressure because they've redesigned that homepage three or four times in a very short time.
- ta988 6y agoYes they are working on a redesign (logo, graphic chart...) I guess they are trying things out.
- anonyfox 6y agoNext 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.
- wffurr 6y agoAndroid 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 6y agoYep 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 6y agoKotlin 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 6y agoKotlin 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 6y agoIf you missed it, the latest investment from Google to the Kotlin compiler is the KSP plugin: https://github.com/google/ksp https://github.com/google/ksp
- AndrewDucker 6y agoI didn't even know Kerbal Space Program allowed that kind of plugin!
- throwawinsider 6y agoRegarding 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 6y agoWhat's next, google gets the majority of the browser market while also becoming the biggest donor of mozilla? oops...
- formerly_proven 6y agoI 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.
- davnicwil 6y agoA 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?
- marton78 6y agoFor your use case just use PostgREST.
- dbsmith83 6y agoMy 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 6y agoWhat do you use at the database layer? Hibernate, or something lighter, and more Kotlin native, like Exposed?
- dbsmith83 6y agoWe 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.
- hnrodey 6y agoAny 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 6y agoJetbrains 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 6y agoIt 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 6y agoI hope not. I will cry when Google inevitably fucks the product up then closes them down.
- preommr 6y agoDoes 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.
- pjmlp 6y agoIt would be interesting, which just makes using Eclipse and Netbeans to this day, an even better decision.
- melling 6y agoInteresting 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 6y agoComing from Swift, you will not be lost in Kotlin.
- pixel_tracing 6y agoSeconding 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 6y agoI like Scala but it's pretty complicated. I'm hoping Kotlin might be just approachable enough for the masses that we can drop the boilerplate that Java still requires.
- kag0 6y agoKotlin is like Scala (more ergonomic and with immutable collections in the standard library), but without implicits and with Java's weaker type system. It also has more compilation targets than Java (js, llvm, jvm). Java is already taking hints from Scala and quickly adding Scala inspired features, which is making it similar to Kotlin. I think unless Kotlin innovates and does something not already in Scala, it will likely run into the issue of being too similar to Java ~20.
- redwood 6y agoAnyone try out https://github.com/realm/realm-kotlin https://github.com/realm/realm-kotlin for local state yet?
- tibiahurried 6y agoTried 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.
- aweiland 6y agoIt'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.
- TulliusCicero 6y agoKotlin 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).
- pjmlp 6y agoOf course it did, Google is making that decision a reality. On the JVM, Kotlin doesn't matter, it is just another language that pretends to be Java when compiled to Java Virtual Machine bytecode.
- TulliusCicero 6y ago> Of course it did, Google is making that decision a reality. It was already hyped up and rapidly gaining popularity for Android devs prior to Google endorsing it. That's why Google endorsed it. > On the JVM, Kotlin doesn't matter, it is just another language that pretends to be Java when compiled to Java Virtual Machine bytecode. I mean sure, but this applies to replacing Java elsewhere too.
- pjmlp 6y agoScala and XTend were being hyped the same way. If Google wasn't playing dirty, they would have kept updating Android Java to be in line with Java, and let the developers choose. Instead, they purposely stagnate Android Java on a Java 8 subset, let the Android marketing machine push Kotlin over Medium articles, Twitter blog posts, YouTube Android developers channel, Android developer blog posts, MAD training material. And lets not forget the role of JetBrains, having had a role replacing Eclipse with InteliJ in what concerns Android Studio, now they even dropped support for Eclipse on their Kotlin support, as they are quite open that they want to use Kotlin to drive InteliJ license sales. Kotlin is just another flavour of CoffeeScript in what concerns the JVM.
- deleted 6y ago[deleted]
- biztos 6y agoSo 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 6y agoI'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.html#scope https://kotlinlang.org/docs/language-committee-guidelines.ht...
- peter_retief 6y agoKotlin is a really nice clean language to delop with, it should get more and more traction.
- surfsvammel 6y agoI’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.
- some_anon_dude 6y ago> The Foundation secures Kotlin's development and distribution as Free Software But then... > The code is distributed under the Apache License, Version 2.0.
- maxpert 6y agoI’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-doordash-tech-lead-manager-zohaib-sibte-hassan-on-spring-boot-kotlin-grpc-and-more 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!
- randompwd 6y agoHave 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 6y ago> 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.
- randompwd 6y agoJust to update any1. I gave Ktor a shot. Tried to do something very basic - consume a URL. Was using Scratch files in IntelliJ. My god, the Ktor documentation is absurdly bad. Like horrifyingly bad. Google fu throws up results which do not have runnable code or explanation. Enough to put me off Ktor completely and continue my search. Maybe Jetbrains should drop web services framework development and focus on IDE cos Ktor is horrendous and scratch files could use some love. Absolutely terrible API aswell.
- holoduke 6y ago
- brabel 6y agoThis 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-world/ https://foundation.rust-lang.org/posts/2021-02-08-hello-worl... [2] https://en.wikipedia.org/wiki/WHATWG https://en.wikipedia.org/wiki/WHATWG [3] https://news.ycombinator.com/item?id=26121937 https://news.ycombinator.com/item?id=26121937
- yannoninator 6y agoSure, 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.
- nindalf 6y agoI 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.
- lokedhs 6y agoI 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.
- Erlich_Bachman 6y agoIt sounds like you are describing Groovy (which was mature even before Kotlin BTW).
- dehrmann 6y ago> 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 6y agoCheckout 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/ http://www.jooq.org/
- Retozi 6y agowe 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
- jpgvm 6y agoKotlin 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.
- guytv 6y agoI 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 6y ago100% 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.
- rogerthis 6y agoThat's not news. It exists since, well, I really don't remember (2018, I guess).
- adsharma 6y agoKotlin as a competitive next gen language In order for Kotlin to be taken seriously outside Android, especially in relation to Swift/Rust as a native language, it needs a few changes. 1. Make the compiler native binary and competitive with other languages for startup times outside Gradle workflow. 2. Support linux CLI and make/cake work flow as a first class citizen. 3. Support Linux as a host for Kotlin multiplatform mobile. Right now C is the only true multiplatform language I made a post on Kotlin forums on this topic if anyone here wants to take it up.
- phendrenad2 6y agoKotlin is definitely already taken seriously outside of Android. Anecdotally most of the devs I talk to in the web dev world see it as a possible replacement for Ruby/Node.
- pjmlp 6y ago> Right now C is the only true multiplatform language I have been doing pretty alright with Ada, Object Pascal, D, Go, Rust, C#, C++ and Java (yes even on iOS).
- adsharma 6y agoI meant KMM (Kotlin Mobile multi-platform). Not aware of write once and run twice (iOS and Android) apps in these languages. Jetbrains recently removed working Linux support for KMM as a host platform.
- pjmlp 6y agoNeither does KMM, as it only allows for business logic and Kotlin/Native has an incompatible memory model with the JVM ecosystem, requiring code to be explicitly written for Kotlin/Native.
- adsharma 6y agoBoth iOS and Android use garbage collected memory. It's just that iOS uses simpler garbage collection in the form of ARC. KMM code runs fine on JVM right? If you start from JVM code, yeah it needs to be rewritten, but that's not the premise.
- astral303 6y agoClosed by default/final by default is a bad bad decision that reeks of premature optimization. No I don’t want to litter my code with “open” just to allow it to be extensible. Makes Kotlin a non-starters for me.