News for hackers. Stuff that matters.
Re:“I'm basically giving myself a permanent vacation from be... by bpicolo on Thursday July 12, 2018 @02:26PM (#17517291)
Ah, I guess `when` is literally Kotlin's equivalent of match.

What I'm thinking of here is Rust's match statements, which do give you the ability to make use of those intermediary values by making use of Rust's enum type.

https://doc.rust-lang.org/book/second-edition/ch06-02-match....

Re:“I'm basically giving myself a permanent vacation from be... by arkadiytehgraet on Thursday July 12, 2018 @02:32PM (#17517337)
I see; I agree that proper pattern matching would indeed solve that as well, as e.g. Scala does.