HNHacker News
TopNewBestAskShowJobs

udalov

84 karma · joined November 11, 2013

I work on Kotlin: kotlinlang.org

https://github.com/udalov

[ my public key: https://keybase.io/udalov; my proof: https://keybase.io/udalov/sigs/pjMGYJAla2gkaqqIo0o7WvKfoiMWEH0GhI1n31Wicr4 ]

submissionscomments
udalov··on How to See Mars Opposition and Closest Approach to Earth
Re Iridium satellites: unfortunately, they are being replaced by a new generation of satellites which do not produce flares and thus likely won't be seen by the naked eye anymore. Source: https://heavens-above.com/IridiumDemise.aspx
udalov··on The Kotlin Language: 1.0 Beta Is Here
No, as I mentioned, only those 'when'-expressions, the result of which is used as a value, must be exhaustive. Those which are not, we call them 'when'-statements, correspond to an if-else chain in C-like languages and thus are not required to be exhaustive.

More info in the official reference: https://kotlinlang.org/docs/reference/control-flow.html#when...

udalov··on The Kotlin Language: 1.0 Beta Is Here
It's an error only when the 'when'-expression is used as a value, like assigned to a property, passed as an argument or returned from a function. Otherwise it's not an error. There's also a warning for matching enum values over an incomplete set of enum entries, but otherwise non-exhaustive 'when'-expression is green code.

You can basically consider 'when'-expressions to be syntax sugar over Java's if-else or ternary operator (?:) chains.

udalov··on Why you might want to choose Ceylon
Could you please give a few examples of "all the broken, half-designed stuff they are trying to ship"?
udalov··on Why you might want to choose Ceylon
Could you please explain how the internal representation of null in the language's type system has any effect on the semantics of code written in that language?
udalov··on The Benefits of Being Cold
Could you please elaborate on running being damaging?
udalov··on WiFried: iOS 8 WiFi Issue
The free version is also Windows-only
udalov··on Kotlin, the Swift of Android
In fact Kotlin doesn't have reified generics. This idea was planned in the beginning and was reflected in the old docs but abandoned later. I believe there's no reference to reified generics on the new web site anymore.
udalov··on Earl Grey tea intoxication [pdf]
Not sure why they conclude that "bergamot essence may induce muscle cramps" etc based on a single case. What if the man had an allergic response of some kind and 99.99% of the population would be fine drinking so much earl grey tea?
udalov··on Kotlin: A statically-typed language that compiles to JVM bytecode and JavaScript
Most of the time you can omit type arguments:

        val arr = Array(height) { x -> Array(width) { y -> Tile(x, y, Terrain.GRASS) } }