https://kotlinlang.org logo
Title
r

Ruckus

01/22/2018, 11:48 PM
@benleggiero I think what you are looking for is the elusive "just do what I mean" operator. I heard they're adding it to JavaScript.
b

benleggiero

01/23/2018, 5:16 AM
Kotlin has a lot of that already… No need to be condescending
s

Shawn

01/23/2018, 5:17 AM
lol it has convenient constructs within the scope of a consistent grammar
what you’re asking for isn’t a “why don’t they just do X” sort of situation
r

Ruckus

01/23/2018, 6:02 AM
@benleggiero I only meant to be facetious and poke fun at JavaScript, not be condescending to you.
b

benleggiero

01/24/2018, 2:42 AM
@Shawn
val x = ""
is me saying “I want a public value named x and it’s an empty String”. Kotlin does what I mean, and interprets it as
public val x: String = ""
. Languages like Java don’t have any ‘just do what I mean’ idioms, so it would always have to be
public String x = ""
. What I ask for is possible as a ‘convenient construct within the scope of a consistent grammar’; I even gave examples for how/why