[OT] Some neat ideas from the Kotlin language

Xinok via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 20 14:46:58 PST 2016


On Saturday, 20 February 2016 at 09:40:40 UTC, Tobias Müller 
wrote:
> ...
> It's not much more verbose but more explicit.
> Changing the type of a variable based on static analysis is 
> just advanced
> obfuscation. It hurts readability and the gain is questionable. 
> At least it
> only works for nullable types.

I consider this feature similar to requiring all control paths to 
initialize a variable or return a value. Imagine requiring some 
explicit or verbose syntax to enforce this behavior. I don't see 
this being an issue as long as the behavior is consistent between 
compilers (if code works in one compiler, it works in all 
compilers).


More information about the Digitalmars-d mailing list