News for hackers. Stuff that matters.
Re:WWDC21 by throwaway894345 on Monday May 24, 2021 @01:15PM (#27267029)
I'm curious to hear about people's impressions of Swift the language. I haven't used it, but I'm keeping my eye on it, especially if it ever properly makes the leap out of the Apple ecosystem and into general purpose computing (yes, I'm aware that there are efforts, but to my knowledge none have resulted in many commercially successful applications--i.e., it isn't "mainstream" yet).
Re:WWDC21 by blacktriangle on Monday May 24, 2021 @01:37PM (#27267310)
It's good, but it's not really anything special. It feels like a mixture of the good parts of Scala, Kotlin, and Rust. Unfortunately lately it's getting pulled in a weird direction by SwiftUI (property wrappers and function builders are just unnecessary). It will be interesting to see how their actor implementation plays out. For the most part though it feels very restricted with its need for Obj-C interop and I suspect it will never make the leap out of the Apple ecosystem simply because it doesn't offer enough over the aforementioned languages to be worth the trouble.
Re:WWDC21 by tictac-toe on Monday May 24, 2021 @01:52PM (#27267515)
> It feels like a mixture of the good parts of Scala, Kotlin, and Rust.

Indeed, I think at the moment it's hands down the best language available for general application programming. The problem is the lack of libraries on non-apple platforms.

Re:WWDC21 by read_if_gay_ on Monday May 24, 2021 @02:01PM (#27267639)
Property wrappers are unnecessary but sometimes they allow for very clean code. For example you can create a wrapper to persist data to UserDefaults like

@Persisted(key: “myKey”) var myInt = 42

which is a really nice way to avoid a lot of boilerplate.

Re:WWDC21 by math-dev on Monday May 24, 2021 @01:28PM (#27267208)
I will let others more qualified opine, but for me it was quite easy to use. I think Android has Kotlin, and imo Swift & Kotlin are not too different, which makes it easier for someone trying to build across two different platforms.

I like Swift’s use of generics and protocols (can’t remember if I am using the right terms), but I really didn’t like some of the more recent changes that obscured parts of the language behind unnecessarily obtuse DSLs.

That said, I think everybody enjoys what they use most, so I don’t see Swift leaving the Apple ecosystem in the near future.

These days I have been abducted by aliens, extra terrestrial beings, and program exclusively in Common Lisp, with its secret alien technology. Now THAT is a language I recommend, its simply amazing to me :)

Re:WWDC21 by throwaway894345 on Monday May 24, 2021 @01:37PM (#27267307)
> That said, I think everybody enjoys what they use most, so I don’t see Swift leaving the Apple ecosystem in the near future

FWIW I've used Python and C++ the most, and I deeply dislike them. :)

Re:WWDC21 by kitsunesoba on Monday May 24, 2021 @02:49PM (#27268223)
One of the biggest differences between Swift and Kotlin in my day to day is that breakpoints/debugging in Kotlin are glacially slow compared to the same in Swift (which itself is a fair deal more slow than debugging Objective-C). I'm not sure if this is due to JVM baggage or what, but it can make chasing down bugs in Android rather painful, slowing methods that normally run in a fraction of a second to take several minutes.
Re:WWDC21 by allenu on Monday May 24, 2021 @07:41PM (#27271015)
Speaking purely as someone who was using Objective-C before on Mac and iOS apps, it's incredibly productive. I can convert ideas into code very efficiently as the language allows you to be concise. How it compares to other modern languages, I can't comment on too much.