Earlier quoted context omitted.
While somewhat longer, you do have var map = hashMapOf("a" to 6, "b" to 12) var list = listOf(1, 2, 3) This is still not Java-level verbosity.
I like that a lot, but the `to` syntax bugs me. Why not a colon, or Scala's `->`?
Learn Kotlin in Y Minutes
151–160 of 239 posts
Re: Learn Kotlin in Y Minutes
#152I'm a bit disappointed that there's no metaprogramming support in Kotlin. Even Groovy had some AST-level transformators. Maybe we'll get some high-level API for writing APT-level tools in Kotlin itself ...
If you're looking for metaprogramming on the JVM, and like the semi-functional approach of Kotlin, you should definitely take a look at Clojure.
I hope kotlin native is as good as scala native. I don't care about kotlin vs Java, but kotlin vs scala native is HUGE to me.
Re: Learn Kotlin in Y Minutes
#153Earlier quoted context omitted.
my beef is with 'val' being keyword. How many variables did you name val in all your coding? I certainly did.
`val` is never an appropriate name for a variable because it tells you nothing at all about what the variable contains.
Re: Learn Kotlin in Y Minutes
#154Earlier quoted context omitted.
my beef is with 'val' being keyword. How many variables did you name val in all your coding? I certainly did.
`val` is never an appropriate name for a variable because it tells you nothing at all about what the variable contains.
Re: Learn Kotlin in Y Minutes
#155I like kotlin a lot, but suddenly there are a lot of articles in the front page about it. Kotlin isn't more cool because Google announced yesterday it is going to use it in Android. Kotlin is the same good language it was 2 days ago! (rant over) If you want to learn kotlin go to the official docs and tutorial, they are as good as the language: http://kotlinlang.org/docs/reference/ And you don't need to install anythi…
The language itself isn't 'more cool' or better, but the risk profile of adopting it has dropped dramatically. That makes it much more interesting.
My wife would leave me if she knew how much I love Kotlin, but I could never use it for work projects because we just could not justify expecting random inheriting developers to know Kotlin and accept its legitimacy. That constraint lifted in an instant. It's a political thing, but it really matters.
Re: Learn Kotlin in Y Minutes
#156Re: Learn Kotlin in Y Minutes
#157Could someone paraphrase the argument for learning Kotlin? I understand it's essentially Jetbrain's fork of Java, motivated to some degree by the desire to provide useful realtime information to programmers working in the Jetbrains ecosystem. Presumably this implies that certain features present in Java that are ambiguous at compile time (e.g. generic types) might be winnowed away in the pursuit of a language more co…
Re: Learn Kotlin in Y Minutes
#158It looks like there's been a very conscious effort to strike a midpoint between Java's familiar clunkiness and Scala's hipster experimental side. I think that's a good thing, you end up with a language that feels pragmatic and powerfully practical.
Re: Learn Kotlin in Y Minutes
#159I like this val z = (1..9).map {it * 3} .filter {it I'd like it more if it said it performed the functions in parallel. If it does this Automagically I'm sold. If it doesn't, is there an easy to use form that does do batch operations like map in parallel?
Re: Learn Kotlin in Y Minutes
#160Earlier quoted context omitted.
I'm guessing here: With const there's always the disccusion about consts not being constant, e.g. when referencing an array or object (reference itself is constant). With "val" you don't have that confusion?
But why not let? Or any word that doesn't start with "va"?