Roy Grini
05/18/2021, 10:07 AMirus
05/18/2021, 10:12 AMLazard
05/18/2021, 10:27 AMirus
05/18/2021, 10:36 AMirus
05/18/2021, 10:48 AMNow, both java and kotlin cater to this use case, they cater to it in a different way, and I'm pretty sure that if I could smack a giant reset button and design kotlin all over again and release it today into public beta, then kotlin would have followed in java's shoes. Especially considering that the java version is in many ways far more powerful than kotlins: You can do more than just 'check type' with this syntax (you can also 'deconstruct' value types), you don't NEED a block, as in, this works too:
irus
05/18/2021, 10:49 AMRoy Grini
05/18/2021, 10:51 AMirus
05/18/2021, 10:55 AM@Metadata(
mv = {1, 4, 3},
bv = {1, 0, 3},
k = 1,
d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\b\u0010\u000e\u001a\u00020\u000fH\u0016R&\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\bX\u0096\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"},
d2 = {"Llink/kotlin/repo/GithubConfigurationService;", "Llink/kotlin/repo/ConfigurationService;", "httpClient", "Lorg/apache/http/client/HttpClient;", "yamlMapper", "Lcom/fasterxml/jackson/databind/ObjectMapper;", "(Lorg/apache/http/client/HttpClient;Lcom/fasterxml/jackson/databind/ObjectMapper;)V", "configuration", "", "", "getConfiguration", "()Ljava/util/Map;", "setConfiguration", "(Ljava/util/Map;)V", "update", "", "repo.kotlin.link.main"}
)
irus
05/18/2021, 10:56 AMRoy Grini
05/18/2021, 10:56 AMirus
05/18/2021, 10:57 AMThis annotation is present on any class file produced by the Kotlin compiler and is read by the compiler and reflection
irus
05/18/2021, 10:57 AMirus
05/18/2021, 10:58 AMRoy Grini
05/18/2021, 10:59 AMirus
05/18/2021, 11:01 AMIntelliJ needs this info also in order to provide debugging i guess.Debugging built on top of JDI, and probably can't benefit from @metadata directly
irus
05/18/2021, 11:02 AMirus
05/18/2021, 11:04 AMirus
05/18/2021, 11:04 AMirus
05/18/2021, 11:06 AMthanksforallthefish
05/18/2021, 12:21 PMthanksforallthefish
05/18/2021, 12:25 PMirus
05/18/2021, 12:58 PM