Better HN
topnewbestaskshowjobs
Log inSign up

udalov

84 karma · joined Nov 11, 2013 (13y ago) · 15 submissions

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 ]

Submissions

comment 8y ago · link · parent

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

2.

The Java type system is broken(wouter.coekaerts.be ↗)

2 points · by udalov · 8y ago · discuss

comment 11y ago · link · parent

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...

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

Could you please give a few examples of "all the broken, half-designed stuff they are trying to ship"?

comment 11y ago · link · parent

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?

7.

Renoise Redux(renoise.com ↗)

2 points · by udalov · 11y ago · discuss

8.

Meduza.io – Russia’s top news and reporting, in English(meduza.io ↗)

1 points · by udalov · 11y ago · discuss

comment 11y ago · link · parent

Could you please elaborate on running being damaging?

10.

State of the Specialization: Generics over primitives in Java and JVM(cr.openjdk.java.net ↗)

83 points · by udalov · 11y ago · 1 comment

11.

Google Protocol Buffers v3.0.0-alpha-1(github.com ↗)

13 points · by udalov · 11y ago · 1 comment

comment 12y ago · link · parent

The free version is also Windows-only

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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?

comment 13y ago · link · parent

Most of the time you can omit type arguments:

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