What does Jow Forums think of Kotlin? I like the built in null enforcement checking...

What does Jow Forums think of Kotlin? I like the built in null enforcement checking, and Kotlin Native looks interesting..

What do you Anons think?

Attached: Java_vs_Kotlin.png (1920x1592, 141K)

It looks really cool from what I've seen of it. I think a lot of android developers are looking towards using kotlin instead of java in the future.
That said, it's not really a bandwagon worth jumping on unless you use it at work. It's too new to look good on a CV and personal projects will be easier on languages with more mature ecosystems.

It was made for Android, using it for anything else is questionable.

Questionable in the sense that it could be unstable?

>Java
>private
just make all the members public, faggot

but what if I want to enforce constraints on my members?

I would be really surprised if it were unstable or leaked memory. It's probably slower than Java but if you're interested in trying a new language there's no harm in trying it.

Java is better with lombok.

@Data
@EqualsAndHashCode
public class Person {
private String name;
}

C#

class person {
public string Name { get; set; }
}

>personal projects will be easier on languages with more mature ecosystems
you get the whole Java ecosystem with full interop though.

It's super comfy, the only stupid thing I've found is the inline reified generic functions when you need to get the generic type info.

Lombok uses code generation correct? Or is it changing bytecode?

The Java Annotation Processing API is a pathway to many features some would consider to be... unnatural.

>pic
What do you do when you want to set the name: String of Person to read only for accesses from other classes? I.e. what you would do in Java with only providing a gettter and no setter.

It's pretty nice, but I want them to add full pattern matching. Kotlins's when statement looks like it does at first glance, but actually it doesn't. Was quite disappointing.
>languages with more mature ecosystems.
You can use the entire existing Java ecosystem almost seamlessly.
>It was made for Android
No it wasn't.
Brainlet.
>It's probably slower than Java
Not really, Kotlin produces pretty similar bytecode.

Using JVM bloat tier...i would choose javascript

val is considered read-only in kotlin. var is a normal variable

I've been learning it for a few months, it's like java, but without all the stupid shit about java, plus they add all the shit you wish java had. It's crazy powerful for certain tasks, and with it being adopted for Android, it's likely to become pretty relevant.

From what I've seen, it performs on par with Java. The speed difference is negligible. Compile times are a little on the slow side (at least with gradle), but it isn't unbearable and the amount of time you save writing in Kotlin vs writing in Java vastly outweighs the increase in compile time.


I think the filter/sort/fold/reduce/data classes/destructuring/etc will help Kotlin find a home in data science, which would put it back on the desktop, but only time will tell. Interop with Java is pretty clean, which will help big java applications ease into Kotlin over time.

In Kotlin, "val" is read-only and "var" is writable. So the example in the pic is read-only already and not identical to the Java class.

Lombok is stoopid.

Is the compile time that bad? How big is the project you're working on?

>electron

Attached: 1529076862543.gif (500x382, 168K)

ur stoopid

Like the other anons said, val is read only, but I'll add that changing a val is a compile-time error instead of runtime, which is nice for debugging.

You can also have an interface with a val type, then a class can inherit that interface and makes that variable into a var, and Kotlin doesn't care. The inheriting class will allow the variable to change, but if an instance of that class is stripped of its type in some scope, the variable becomes read-only in that scope. It's pretty cool.

Show us how extending a data class is done.

Go on, I double dare ya nigga.

Is Kotlin really this nice compared to java for everything else? I use java every day, I absolutely cannot stand how strict it is concerning types and autoboxing and unboxing and casting and shit
What's a good IDE for it? I use NetBeans for all my java shit

Use Intellij, and Lombok. Kotlin not needed.

lol no it wasn't