[OT] Some neat ideas from the Kotlin language

Yuxuan Shui via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 22 11:59:54 PST 2016


On Monday, 22 February 2016 at 19:33:12 UTC, Ice Create Man wrote:
> On Thursday, 18 February 2016 at 23:33:45 UTC, Yuxuan Shui 
> wrote:
>> Just come across Kotlin today, and found some interesting 
>> ideas skimming through its tutorial:
>>
>> [...]
>
> Both those issues predate both Kotlin and Swift. C# has had 
> both of them for as long as I've been coding in the language. 
> Nothing new here.

Sure that Optional types and dynamic casts have been there for 
ages. But this is the first time I see a compiler does the 
unwrapping & casting for you based on static analyses.

And Xinok pointed out we have been using the same technique for 
detecting uninitialized variables, so what Kotlin does can be 
seen as a small, but clever, extension of this.


More information about the Digitalmars-d mailing list