News for hackers. Stuff that matters.
Re:Embedded Swift on the Raspberry Pi Pico by jwells89 on Tuesday March 05, 2024 @10:36PM (#39612024)
I miss Swift enums when writing Kotlin. Kotlin enums are more restricted in that associated values can’t differ between cases, which limits their usefulness and means that much of the time what you want are instead sealed classes.

There’s actually several bits of Kotlin like this which feel somewhat pedantic/idiosyncratic and fussy if you’re used to writing Swift. I’m sure there’s valid design reasons behind these decisions, but sometimes it feels like unnecessary friction.

Re:Embedded Swift on the Raspberry Pi Pico by MrBuddyCasino on Wednesday March 06, 2024 @03:45AM (#39613736)
Since sealed class definitions can live in the same file and the syntax is quite compact, in Kotlin they don't annoy me as much as in Java.