News for hackers. Stuff that matters.
Re:Writing Gnome Apps with Swift by stevepotter on Wednesday March 27, 2024 @07:37PM (#39845948)
I did obj-c on a popular consumer app about 10 years ago. Recently had to make an app. I used async/await and SwiftUI heavily. Used observableobject and actors as well. It’s very nice, much like a React/typescript app. UIs used to be torture

I did have to build some things that I felt should have come standard. For example, I had to build a class that provides a thread-safe way to enqueue objects and process them in a background task, which used DispatchQueue internally.

By and large, it’s a world of difference from what it was and my experience has been joyful. Xcode cloud just worked so that’s cool. Profiling is wonderful (signposts etc). Could there be improvements? Sure. Are there other languages with better features? I think so. But I haven’t found myself longing much for something provided by other languages and platforms

Point is, I no longer dread iOS development. In fact, it’s quite fun.

Re:Writing Gnome Apps with Swift by cageface on Wednesday March 27, 2024 @08:33PM (#39846400)
I'm coming back to iOS development after years of doing web stuff. SwiftUI will feel very familiar to anyone that's done React and massively reduces the amount of boilerplate and ceremony it takes to build for Apple platforms. It has some rough edges but overall feels like the most modern mainstream UI toolkit now.
Re:Writing Gnome Apps with Swift by astrange on Thursday March 28, 2024 @01:27AM (#39848045)
> I did have to build some things that I felt should have come standard. For example, I had to build a class that provides a thread-safe way to enqueue objects and process them in a background task, which used DispatchQueue internally.

That is DispatchQueue. Or NSOperationQueue. Or preferablly Swift concurrency.

Most wrappers around dispatch queues are unnecessary and use it incorrectly. (I would say this is true of operation queues themselves.) Swift concurrency is better than dispatch, though.

Re:Writing Gnome Apps with Swift by saagarjha on Thursday March 28, 2024 @10:27AM (#39851966)
> Swift concurrency is better than dispatch, though.

For some things, sure.