This could also mean you've designed a verbose and turgid language. A better metric might be # of projects using Kotlin. (For the record, I'm actually really excited about using Kotlin, I just found it somewhat hilarious to boast about exponential growth of LOC.)
Kotlin 1.0 Released: Pragmatic Language for JVM and Android
51–60 of 112 posts
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#52Earlier quoted context omitted.
how do you do conditionals or loops in maven?
You can use the maven polyglot plugin [1] to write your POM in something other than XML. It's fairly new, but it's there. We use it in JRuby to write our POMs in Ruby. As an example of a loop: https://github.com/jruby/jruby/blob/8e29ae1302e7aa989b8808f7... [1] -- https://github.com/takari/polyglot-maven
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#53https://github.com/mythz/kotlin-linq-examples
Thanks to JetBrain's tooling prowess it also has great integration with Android Studio - Light years better for functional programming than Java 1.7:
https://github.com/mythz/java-linq-examples
Which can seamlessly integrates with Java within the same project. Google/Java/Android Devs are sitting on a unrealized gold-mine of productivity with Kotlin, should be the modern successor for Android.
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#54Earlier quoted context omitted.
So I think gradle has a lot of problems, but having access to Groovy anywhere is a good thing. You can always make your builds do what you want. And as in all things if your code gets too complicated you need to refactor, extract logic into methods/classes, etc.
You can always make your builds do what you want, but the flipside is you can never understand what someone else is doing with their build. I don't think the build system is the place for turing-complete code. Business logic certainly doesn't belong there. Keep the build simple and standardized, and keep code in code.
I do have a problem with Gradle which is that it is almost entirely magical unless you are a pretty advanced Groovy programmer to understand how it is doing what it is doing. I have never felt more disoriented than when trying to learn how to customise a simple aspect of my build and having people post snippets that work but seem completely disconnected from anything else in the build process.
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#55Earlier quoted context omitted.
You can use the maven polyglot plugin [1] to write your POM in something other than XML. It's fairly new, but it's there. We use it in JRuby to write our POMs in Ruby. As an example of a loop: https://github.com/jruby/jruby/blob/8e29ae1302e7aa989b8808f7... [1] -- https://github.com/takari/polyglot-maven
Why can't I use Java with Polyglot?
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#56Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#57Earlier quoted context omitted.
The point of the class instance (the "singleton") is not performance, it's that it exists independently of any instance of the type, so it can be used for factories and such. This however, is not my main concern, and as you remarked, it does not fit very well in OO, which is why it isn't in my proposal. On to the interesting part. You want multiple adapters, rather than multiple interfaces, precisely because you want…
Thanks for the explanations. Yes, there seems to be an impedence mismatch when trying to import the concept of Haskell type classes to OOP languages. WRT a combined adapter class, it'd look like this in Kotlin: class FooBarAdapter(val x: Baz, private val y = Foo(x), private val z = Bar(x)) : Foo by y, Bar by z A bit bloaty, but still a single line of code. (I know you already know this, I'm writing it here for Kotlin…
It's very nice, though I can see that becoming quite heavyweight when you nest these calls (either heavy from the overhead, or from the syntax - at least you get to decide).
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#58Kotlin sort of feels like Groovy "done properly" (with no disrespect to the authors of Groovy). Groovy kind of evolved in an opportunistic, unplanned manner and ended up with millions of features, cool whiz bang aspects that look awesome that don't always turn out well when you use them on a large scale. Kotlin seems to capture the same ideas (highly pragmatic, maintain perfect bidirectional compatibility with Java),…
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#59I've been using Kotlin for work (I'm a PhD student, so work is to be understood in a peculiar fashion) and I'm really liking it. It's a much needed upgrade to Java whose fundamental advantage is what I'd call "crispness": you can write terse code that is actually understandable. In particular, the notion of inlining closures allows for efficient functional programming and great DSLs. In comparison to Scala, Kotlin is…
What an awesome term, I love it.
Re: Kotlin 1.0 Released: Pragmatic Language for JVM and Android
#60Earlier quoted context omitted.
Can you name any criticism of Gradle? I've used it for years now (for Android development). It's steadily being improved, and is really good in my opinion.
There's no clear separation between build config and random Groovy expressions. There's not even a spec for what a .gradle file looks like. That's fine for "get this done quickly", but ultimately it encourages people to put one-off hacks in the build file that become a maintainability nightmare. (And because its "config" files are arbitrary turing-complete code, its IDE integration is never going to be as good as Mav…