News for hackers. Stuff that matters.
Re:Writing Gnome Apps with Swift by newZWhoDis on Wednesday March 27, 2024 @10:24PM (#39847105)
My dealbreaker for kotlin is that it’s possible to call a throwing function with no indication it will throw. In swift, the compiler forces every throwing function do be inside a try/catch block or be called by another throwing function.

I also am extremely unhappy that those functions can be 16 layers deep somewhere in a lib and cause your app to blowup.

Re:Writing Gnome Apps with Swift by jwells89 on Wednesday March 27, 2024 @10:55PM (#39847274)
Yep, this is a problem I’ve encountered several times. Even if none of your own code has unhandled throws, you’ll inevitably get crash reports coming in from fooLib throwing an exception somewhere because the moon was in the wrong phase.
Re:Writing Gnome Apps with Swift by rockyj on Thursday March 28, 2024 @04:20AM (#39848826)
There are entire languages built with unchecked exceptions, Python, Ruby, Nodejs and most recent ones. Even with checked exceptions you can write code and miss to throw or declare an exception somewhere so ultimately the developer has to deal with exceptions somehow.