Does anyone has some more resources about the 'ric...
# kotlinconf
b
Does anyone has some more resources about the 'rich errors' talk from yesterday, I think that is not even experimental yet, could it be?
👍 1
e
Pretty sure on the 9am keynote yesterday it was mentioned about being experimental for kotlin 2.4. I might be wrong, I missed the rich errors talk but plan to catch the recording asap. There's active discussion going on about the feature here https://youtrack.jetbrains.com/issue/KT-68296
👍 2
👍🏽 1
b
Oh, I think I missed that. I will check that, thanks a lot
e
Wasn't 2.4 for destructuring only?
o
Thanks for asking; I also missed this information in the (very nice) Rich Errors talk, and couldn't find anything here on Slack or in the KEEP repo! 😄
❤️ 1
c
I'd also love confirmation of the target release for this - the keynote definitely says Experimental 2.4 but based on the 6 month release cycle that would be May 2026 😭 . Is that true?
From the keynote:
e
Honestly happy it's taking a long time, dropping that feature too early and having libs adopt it might cause quite some issues...
1
c
I feel somewhat hard done to having to wait that long after there having been a great talk on it that got me all excited about it though 🤣
💯 1
b
Oh wow, that is about 1 year 🙈 I can't wait to use this 😂 I think that makes error handling much cleaner
kodee excited 2
o
Yeah, I just asked at the JetBrains booth, and they said aiming for 2.4 or 2.5 (possibly for Beta), which is indeed at least a year away. But of course no guarantees on timelines.
thank you color 3
😭 3
b
Thanks a lot for asking 😊 too bad that we will have to wait that long, it is such a cool feature
e
Shipping it later might mean by a miracle with also get union support beyond errors, who knows 👀
😄 2
c
Haha I like your optimism! 🤞
👍 1
e
Untagged unions are the last missing piece for me to migrate completely from TS, that's why I really want them lol
☺️ 1
a
Wait… how do you do untagged unions in TS? TS is structurally typed. I always need tags to differentiate them.
e
I mean you can have a
string | number
a
Yeah so how do you differentiate between them?
e
typeof, or in the case of complex objects, type guards.
Scala uses
instanceof
for the most part as far as I could see when checking it out.
a
Ah yes. Then it is a matter of preference. I typically use tags for unions of large JSON objects originating from things like Zod.
e
Yup I agree with you on the fact tagging is better for the most part. But there is always that case where accepting or returning a simple union is more elegant
Not to mention the extreme difficulty of interoping with TS libs now.
231 Views