[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Kotlin

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 4

File: kotlin.png (11KB, 700x700px) Image search: [Google]
kotlin.png
11KB, 700x700px
There's currently a lot of hype around this new language.

Now it's developed by JetBrains which instantly attracts me because they develop amazing software, but I can't see what's so special about Kotlin.

Anyone done anything serious with it?
>>
Syntax looks like it's trying to do for Java what coffeescript was trying to do for Javascript
>>
>>60511136
So... Fucked even more?
>>
I can't get over this syntax. It's ugly. Reminds me of Objective C.

fun main(args: Array<String>) {
}


This is how you specify type. Is there really a need to re-invent the wheel? That's wrong with int foo = 7?

val foo: Int = 7
>>
>>60511136
CoffeeScript was just syntactic sugar, but it largely failed at that: it was way too terse to the point that it became a write-only languag, but it had its uses (being able to quickly write a small script).

Kotlin on the other hand, while attempting to make Java less verbose e.g.

System.out.println()
=>
println()


public static void main foo
=>
fun foo


It had to fuck around with the type system and add its own little idiosyncratic syntax which was absolutely not needed. I just had a look at a simple program and they changed "import" to "package". It's like they HAVE to change little things like that in fear of being considered a Java rip off, even though its job is to be a wrapper for Java to make Java programming more productive.
>>
>>60511213
>they changed "import" to "package"
What pajeet code did you look?
https://github.com/googlesamples/android-AutofillFramework/blob/master/Application/src/main/java/com/example/android/autofillframework/app/MainActivity.java
https://github.com/googlesamples/android-AutofillFramework/blob/master/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/MainActivity.kt
>>
>>60511213
The use cases you are trying to show are also just syntactic sugar
Everything in kotlin is about syntactic sugar.

They try to make Java functional but were too afraid to go all the way.

>Hey, if your method has one non-self argument you can make it into an infix operator until it needs two arguments and you need to revisit and fix all your code :)

I may be wrong in this, I only watched the GoogleIO presentation but it seems like so many things in Kotlin only apply in very specific cases where the compiler needs to help you to remember and as soon as you change something that violates it you will need to revert everything to the base case.
>>
>>60511149

I agree, this looks like shit. Language features are nice and all, but this is fugly.
>>
File: standards.png (24KB, 500x283px) Image search: [Google]
standards.png
24KB, 500x283px
>>60511107
Yet another new meme language
>>
File: pikantny.jpg (39KB, 600x600px) Image search: [Google]
pikantny.jpg
39KB, 600x600px
>a language named after a Polish brand of ketchup

welp
>>
>>60511149
>name: type is reinventing the wheel
are you under 18?
>>
>>60511107
>There's currently a lot of hype around this new language.
Never heard of this language.
>Now it's developed by JetBrains which instantly attracts me because they develop amazing software, but I can't see what's so special about Kotlin.
'amazing' software you say? are you shilling this shit?
>Anyone done anything serious with it?
Yet another Java-like language. intothetrashitgoes.png
>>
>>60511107
It looks like they reinvented Scala.
>>
>>60512125
t. professional fizzbuzz engineer
>>
>>60511149
I like this syntax. It looks just like Rust or Swift. Way better than C's cringeworthily ambiguous syntax.
>>
Tbh, looking at Kotlin it looks like a rather nice multiparadigm language. I probably won't use it because I don't have any particular reason to use it atm unless it gains traction and gets some uniquely useful libraries. But I would definitely prefer using it over say Go if I were given a choice between the two.
>>
>>60512406
Yea, I think that was kinda stated to be a goal. "Scala but simpler"? ~The same goal as Ceylon.

I personally like where ol' Scala is currently going more.
>>
>>60511107
>There's currently a lot of hype around this new language.
You mean because google anounced they're gonna support it for android? I'll wait till it matures first.
>>
>>60512806
>support it for android
What does that even mean?
You can use any language that can compile .class files for jvm for programming android stuff(kawa scheme, clojure, ...).
>>
File: 1-X0JgS3Go9vsMcwCe_95gWA.png (6KB, 877x534px) Image search: [Google]
1-X0JgS3Go9vsMcwCe_95gWA.png
6KB, 877x534px
>>60511107
It's just something you can use as an (almost) drop-in replacement when you've been doing Java and you want to make it easier and more pleasant.

>>60512406
>Is there really a need to re-invent the wheel? That's wrong with int foo = 7?
what do you mean? this kind of syntax existed since Pascal was created 47 years ago. it reads and writes more naturally:
"I declare an immutable variable named foo of type Int to which I assign 7"
vs
"Of type int I declare something called foo to which I assign 7 [so I guess it's a variable then, but who the fuck knows whether it's mutable or immutable by default]"

>>60512406
no, it's more of a middle ground between Java and Scala.

>>60512734
>summoning the Go shill
I see what you did there

>>60512806
It already did, that's why they started supporting it.

>>60512851
It's first-class support, meaning "we'll make sure it works and include it in our official tooling and documentation"
Thread posts: 20
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.