Live data from Hacker News

SwiftUI

developer.apple.com

231–240 of 394 posts

Re: SwiftUI

#231
post #178

I’m one of the engineers that spearheaded this initiative inside of Apple. I just wanted to thank the HN community—I’ve been reading HN for 10 years now and it’s been formative in my development as a software engineer. If you’re at WWDC stop by the labs and say hi!

Nice work! In the keynote it was mentioned that SwiftUI would work across all Apple products. Will it work on previous versions or only the latest iOS/macOS/etc?

What? You develop it using SwiftUI, then you compile it and it will run on whatever you compile it to. So yes, it will run on older OS versions.

Re: SwiftUI

#232
post #89

This reminds me Visual Studio back in 2001 when I discovered programming. Everything was so easy to prototype. I'm so happy to see Apple is taking this direction. Thank you guys!

I assume you mean Visual Basic, since Visual Studio was geared towards C/C++. Unless you actually used the MFC designer in VS5/6, which never really worked that well for me.

Re: SwiftUI

#233

Earlier quoted context omitted.

This looks very similar to Flutter, I wouldn't be surprised if they took some ideas from that which is all well and good; UI construction needs a facelift.

That is exactly what I said when I saw the code on the screen. Now if they released a development environment for Android also.... (wishful thinking)

If you mean and official declarative UI library then Google released one of those at Google IO this year:

https://developer.android.com/jetpack/compose

Re: SwiftUI

#234
post #89

This reminds me Visual Studio back in 2001 when I discovered programming. Everything was so easy to prototype. I'm so happy to see Apple is taking this direction. Thank you guys!

I assume you mean Visual Basic, since Visual Studio was geared towards C/C++. Unless you actually used the MFC designer in VS5/6, which never really worked that well for me.

Actually I had VB6 in mind yes, but after a few months playing with it I made the switch to .NET (which was still in beta I believe at the time) so I was using Visual Studio ".NET" :)

Re: SwiftUI

#235
post #7

Personally, as an iOS developer, this is by far the biggest announcement. Haven’t had the chance to dig deeper, but the comparison between the UITableViewController and that snippet containing just declarative code looks absolutely promising. The only downside is that we’ll have to wait one or two years before we can use it if older iOS versions still need to be supported. Let’s hope for extra quick adoption of iOS 1…

Unfortunately, iOS 13 drops support for iPhone 5s and iPhone 6.[1] Last year, iOS 12 didn't drop support for any devices. The iPhone 6 is a very popular device, and was still sold by Apple less than two years ago. [1]: https://iosref.com/ios/

According to Mixpanel, the 5S / 6 / 6 Plus together account for a bit less than 10% of iOS devices they see. So it's not as big of a drop as one might expect.

https://mixpanel.com/trends/#report/iphone_models

Re: SwiftUI

#236
post #19

Earlier quoted context omitted.

Jetpack Composer you mean. I bet by next IO, Flutter will get replaced by it, specially after the #KotlinEverywhere announcement and Kotlin/Native effort for iOS.

It looks like Jetpack Compose is not really done yet. It's pre-alpha and the Jetpack Compose doc page says don't use it for production. https://developer.android.com/jetpack/compose/ I may be missing something, but SwiftUI seems to be pretty much ready to go today.

Except it’s not ready to go because it’s not backwards compatible it seems.

Re: SwiftUI

#237
This is definitely an overly ambitious project idea, but now that Google has Jetpack Compose and Apple has SwiftUI, and the web has React, I wonder if it would be possible to make a "meta-framework" that uses a single code-base to compile user written code into source code written in those 3 frameworks respectively.

Then you would get truly native, cross-platform development.

Now, the probability this would ever work is 1%, but it's something that has lingered in my mind anyway.

Re: SwiftUI

#238
post #200
post #29

Earlier quoted context omitted.

No he means Flutter which has been around a lot longer, it's immediately what I've thought of being inspired by as well: https://flutter.dev/docs/development/tools/hot-reload

I know pretty much what he/she meant, was just making a point that I don't believe in Flutter's long term success. Trying to sell Dart a 2nd time was a mistake.

Flutter's not a PR campaign for Dart, they're a separate project that chose Dart based on its technical capabilities [1].

Given Flutter enables the nicest native x-plat dev experience today I'd say it has a very bright future, which they've also recently announced Flutter for Desktop and Embedded devices.

Jetpack compose is years away from the same kind of x-plat support that Flutter's providing for Mobile, Web, Desktop and Embedded [2].

[1] https://flutter.dev/docs/resources/faq#why-did-flutter-choos...

[2] https://developers.googleblog.com/2019/05/Flutter-io19.html

Re: SwiftUI

#239
post #119

Earlier quoted context omitted.

I was hoping to hear more discussion about performance. At the root of this seems to be a flexbox-esque implementation in Swift. Yoga, one such flexbox implementation written in C, has touted much better performance over UIKit for a while. How do apps built with SwiftUI compare to their UIKit alternatives? How would it compare with some solutions already in the Swift OSS community that utilize flexbox? [Texture]( htt…

Minor bit of pedantry--Yoga is written in C++.

Both are kinda true - Yoga started as a C library, but was ported over to C++ ~a year and a half ago.

Re: SwiftUI

#240

Earlier quoted context omitted.

QuickDraw and Quickdraw GX aren't UI frameworks (like PowerPlant, AppKit or UIKit), and they aren't a widget library (like HIToolbox). They're much more lower-level than that; drawing libraries on the level of Quartz, Cairo, Skia, or GDI.

Ooh, that mention of PowerPlant that takes me back, I remember CodeWarrior too back in the day. Yes you're right there are various levels here - sometimes it's hard to distinguish them. There have definitely been at least 5 UI toolkits though, and probably more, though of course over the life of Mac OS that is not terribly unexpected. For those who lived through the transition to OS X, this sort of churn is not unusu…

MacApp was a framework that ran on top of HIToolkit, similar to PowerPlant. Originally it was written for Object Pascal, but later it moved to C++.
Post reply on HN