Earlier quoted context omitted.
Wow. Thanks for all this. I've casually read a lot of people's advice on game dev, and while some of it is reflected in what you said, your comment kind of ties it all together. And it confirms something I've been thinking for a few months (possibly years)... Everything needed to write a simple game is right there in C, using structs, pointers, and functions! Anything beyond that is over-engineering. And the convenie…
What you are saying is mostly right, perhaps somewhat of an oversimplification. Interestingly, these days I work with quite a bit of Clojure. Most of what I've been describing came about because people were in OOP hell, and decided to move towards composition vs. inheritance. As multi-core machines, GPUs, and more sophisticated games arose as well, there was more of a need to start thinking more in terms of what the…
Kotlin 1.0.5 is here
101–110 of 111 posts
Re: Kotlin 1.0.5 is here
#102Earlier quoted context omitted.
After having so much fun with Kotlin, I tried switching to Scala and quickly switched back. Scala seems too complicated, with a steep learning curve. Implicits all over the place made it hard to read code and understand what was going on. I do like many of the more powerful features that Scala has, but Kotlin strikes a right balance of simplicity and power in my opinion.
As a really big Scala fan, I can say Kotlin is probably the right choice when it comes to doing Android development. That being said, yes Scala has a steeper learning curve than say, Kotlin or Go. But if you're going to devote the I don't know, next ten years of your life to working in a particular language, does it really matter if it takes two months vs. four months to ramp up?
Plenty of "ok-ish, but not too hard to learn" languages proliferate in that kind of climate, like go for small web services (where Erlang was too much of an investment). The Unix approach of 1001 ad hoc sub-languages (awk, pic, ed...) adapted.
Quite different from e.g. a J2EE developer's approach, who tends to think of career-defining technologies and languages, where Scala seems like a wise investment.
Re: Kotlin 1.0.5 is here
#103Earlier quoted context omitted.
Well, it's kind of the point. Kotlin is supposed to be light weight and easy. Besides, using Scala for Android, while possible, is cumbersome. Kotlin wins this one hands down.
Scala for Android is fine. The only thing that makes it harder than Kotlin is JetBrains disingenuously shipping their Kotlin plugin but not their (more popular) Scala plugin by default, which they could fix tomorrow if they wanted to.
I tried to use Scala for Android in the past and I gave up after attempting to set it up for a few hours. Admittedly it was a while back, perhaps things have improved.
Your claim that Scala on Android works fine got me interested again, so I googled around, found that blog post from May this year (that's more recent than my own experiments), and apparently there are still hurdles: http://blog.scalac.io/2016/05/19/reflections-on-starting-and...
With this type of issues the thing that I'm wary about is not getting a "hello world" app to compile once, but that I can get a project up and running, then need to add something else to the equation (say, a DI, or some code processor), and things fall apart again in an X-Files fashion.
I've heard that Scala has long build times, too, but maybe it's a thing of the past as well - no first-hand experience here as I never got to that stage.
Re: Kotlin 1.0.5 is here
#104Earlier quoted context omitted.
What's unclean about for loops?
For loops require explicit and error-prone use of integer indices and are of limited utility outside arrays. Foreach loops in Java/C# are an attempt to generalise, but they are really just syntactic sugar over external iterators. They give privileged status to the specific iteration interface chosen, entangling the language and its libraries. The actual Iterator interface chosen by Java has proven to be unsuitable fo…
There's no rule that says a for loop must only support a single iteration interface. That seems more like an implementation detail of the compiler than a problem with for loops in general.
Re: Kotlin 1.0.5 is here
#105Earlier quoted context omitted.
I like both, but why do you consider Kotlin better than C#? I also don't get your point about how lame Xamarin apps look. Xamarin apps use native layout components (could be wrapped with lowest common denominator abstractions in case of Xamarin.Forms, but it's optional), so they're 100% capable of looking the same way your native app would.
iOS and Android UX guides have completely different approaches to the logic of user interaction. AFAIK, Xamarin does not allow to have different layouts generated from shared code. So, even that components are native, their placement is alien.
That's true, but noone says or recommends that all the code is shared. Typical Xamarin architecture and good practice assumes sharing the business (or domain) layer, and coding the views separately. In terms of reusability it's still superior in comparison to writing both versions natively. Obviously the level of reuse you can achieve that way very much depends on the nature of the application.
Re: Kotlin 1.0.5 is here
#106Is there anybody switching from Scala to Kotlin?
A programming with more features is not necessarily better. The limited features of Kotlin (compared to Scala) are an advantage, if you change your point of view. Some advantages:
* easier to learn (a Java dev will be more productive than in Java in a day or two)
* easier to maintain since Kotlin doesn't allow so much hard to understand code constructs
* fewer discussions about the one true style or way to do something
* it's easier to build good tooling
* much faster compilation
* smoother Java interop
* performance implications are more predictableRe: Kotlin 1.0.5 is here
#107Earlier quoted context omitted.
Scala for Android is fine. The only thing that makes it harder than Kotlin is JetBrains disingenuously shipping their Kotlin plugin but not their (more popular) Scala plugin by default, which they could fix tomorrow if they wanted to.
Last I checked, Kotlin plugin isn't installed (in Android Studio) by default. Are you referring to IntelliJ Idea? I tried to use Scala for Android in the past and I gave up after attempting to set it up for a few hours. Admittedly it was a while back, perhaps things have improved. Your claim that Scala on Android works fine got me interested again, so I googled around, found that blog post from May this year (that's…
Just use sbt-android and skip all the other nonsense.
Compilation is impressively fast, as the plugin uses the information from incremental compilation to skip ProGuarding completely for things that haven't changed.
Re: Kotlin 1.0.5 is here
#108Earlier quoted context omitted.
For loops require explicit and error-prone use of integer indices and are of limited utility outside arrays. Foreach loops in Java/C# are an attempt to generalise, but they are really just syntactic sugar over external iterators. They give privileged status to the specific iteration interface chosen, entangling the language and its libraries. The actual Iterator interface chosen by Java has proven to be unsuitable fo…
Yeah, I was meaning 'for loops' to include the modern sense of foreach loops too. Java doesn't distinguish and Kotlin doesn't have the old style at all. There's no rule that says a for loop must only support a single iteration interface. That seems more like an implementation detail of the compiler than a problem with for loops in general.
Re: Kotlin 1.0.5 is here
#109Saw this pop up in my IDE this morning, excited to upgrade. The auto-for-loop-refactoring is interesting. I've found I never use for-loops in Kotlin - between the abundance of iterator methods and concise trailing-closure syntax, it always ends up being more concisely expressed as collection.forEach { ...body... }. Seems like the language may be going that way too; I wonder if we'll eventually see the for-loop start…
But does .forEach compile to an efficient for-loop in Kotlin?
Re: Kotlin 1.0.5 is here
#110Earlier quoted context omitted.
Which issues did you experience?
Kotlin: 1 - Install plugin into Android Studio 2 - Configure the Gradle plugin Enjoy Android development within Studio. Scala: Follow this several pages long tutorial: https://www.voxxed.com/blog/2016/10/setting-up-scala-on-andr... Try to enjoy while working around issues with Studio integration and common Android libraries.