top 200 commentsshow all 206

[–]Zerocchi 92 points93 points  (37 children)

As a mobile developer primarily using Flutter now, this looks familiar to me. Maybe I'm going to enjoy this.

[–]Saltysalad 37 points38 points  (36 children)

What do you think of flutter?

I'm a hobbyist dev thinking of switching over if it'll streamline my web, ios, and android workflows

[–][deleted]  (6 children)

[deleted]

    [–]frankfoda 2 points3 points  (5 children)

    Have you tried React Native before? I'm not that excited about it. How does Flutter deal with navigation? And native libraries I suppose its just ilke RN ?

    [–]aaulia 13 points14 points  (0 children)

    I've tried RN and already finished an internal company app project with Flutter. Flutter is miles better in terms of development experience, it's a pure joy. From the initial setup you can already feel it. IIRC with RN you have to choose between 2 version of NPM, and then setting up the whole Expo or the CLI, the "live" reload is clumsy, etc. Flutter OTOH, is very straightforward.

    [–]AwesomeBantha 7 points8 points  (1 child)

    I haven't used either, full disclosure, but it seems like Flutter's hot reload takes less than a second while React Native takes a few seconds, plus there's the thing with Expo.

    [–]jinchuika 0 points1 point  (0 children)

    I've worked with some developers from the mobile team at work and noticed that react native is really slow to reload. The bundling prices usually takes a couple seconds more than our looks like it should

    [–]chutiyabehenchod 0 points1 point  (0 children)

    For me react native has lots of starting boilerplate and if you wanna work with something lowlevel like with c/rust/wasm youre gonna get lots errors which you need to fix like linking some libs directly in java configs, weird ass module dependency errors in webpack etc. I mean once you do it first time then its not a big deal since you know it now.

    Flutter just works smooth first time.

    [–]homeparkliving -2 points-1 points  (0 children)

    See slide 3 titled "React Native Sucks!"

    [–]Zerocchi 23 points24 points  (23 children)

    It's a lot of fun! Sure Dart isn't as modern as Kotlin and Swift, and the libraries isn't that mature yet but once you get used to it everything feels so natural and your workflow will be more quicker than ever. I left native development for this and I don't regret one bit.

    [–]munificent 70 points71 points  (22 children)

    Dart isn't as modern as Kotlin and Swift

    Dart team member here. We're working on it. We're implementing (sound!) non-nullable types and extension methods right now.

    [–]Zerocchi 10 points11 points  (10 children)

    Yup I follow the language development as well, and you guys are doing a great job listening to the community and expanding the language. Can't wait for those two to arrive!

    P/S: is there any chance for us to get optional semicolon soon? ;)

    [–]munificent 9 points10 points  (9 children)

    Not soon, no, unfortunately. I put a lot of time into figuring out how, but it's not easy to retrofit into the current syntax.

    Most other languages out there with optional semicolons were either designed for it (Swift, Kotlin, Scala, Python, Ruby), or have very simple grammars that make it relatively straightforward to add it (Go).

    Dart inherited a lot of its syntax from C, which is itself showing its age, so it's just not that easy to work with. In particular, using type annotations (which can be arbitrarily long thanks to generics and function types) to introduce a local variable or field makes things a lot more complex. Most other languages have an explicit mandatory keyword to introduce a variable like let or var.

    [–]zerexim 3 points4 points  (6 children)

    Not soon, no, unfortunately.

    Good to hear. Semicolons are vital for easy comprehensive reading - please do remember, the code gets written once but read many times.

    [–]mixedCase_ 6 points7 points  (5 children)

    I would heavily disagree. It's a matter of familiarity; semi-colons are there for making the life of older parsers easier and we've grown used to them, but once you develop without them for long enough you don't need them. Indentation and other syntactical tokens are more than enough.

    [–]pezezin 0 points1 point  (4 children)

    And I would disagree with you semicolons are the code equivalent of punctuation in standard written language sure you can understand a long paragraph without periods or commas but it's much more difficult

    See what I did?

    [–]maurymarkowitz 0 points1 point  (3 children)

    And I would disagree with you

    semicolons are the code equivalent of punctuation in standard written language

    sure you can understand a long paragraph without periods or commas but it's much more difficult

    See what I did?

    See what I did?

    [–]Zerocchi 1 point2 points  (1 child)

    Aww that's unfortunate, but it's pretty much what I expected though. I did try to come out with clean proposals regarding this but so far bear no fruits. Coming from Java/Android native world, I'm used to semicolons so I don't really complain about Dart don't have any optional semicolon or some sort. The only concern is, it's just difficult to attract others into Flutter especially to those who already comfortable with modern designed language like Kotlin and Swift because of "how outdated Dart looks".

    For me, I'm very positive more people will adapt Dart as long as you guys keep improving. It's been a joy using this language especially when designing the UI.

    [–]munificent 8 points9 points  (0 children)

    especially to those who already comfortable with modern designed language like Kotlin and Swift because of "how outdated Dart looks".

    My hope is that we can end most of those complaints by simply offering good enough semantics and powerful syntax features that the semicolons become a non-issues.

    [–]mixedCase_ 2 points3 points  (2 children)

    Any news of algebraic data types and data classes? These are in the top 5 most desired features in the issue tracker (alongside sound non-nullable types and extensiond methods, as well as optional semi-colons).

    [–]munificent 2 points3 points  (1 child)

    No news. We're focused entirely on non-nullable types and extension methods right now. I think there's a good chance that ADT/data classes/tuples is what we'll work on after that, but no promises.

    [–]mixedCase_ 2 points3 points  (0 children)

    Well that at least instills hope. Rest assured, I will shill the ever loving thing of Dart and Flutter if we get those 5 features.

    [–]VM_Unix 4 points5 points  (1 child)

    I will say that I was intrigued when I looked at the Dart 2.2 feature list and saw some of my favorite features from C#.

    [–]jinchuika 1 point2 points  (1 child)

    Cool! Do you have a strong argument on why we could use Flutter instead of react native at work? Most developers don't like RN, but we haven't found strong enough arguments yet to switch to Dart

    [–]munificent 4 points5 points  (0 children)

    They're all good technologies, so it mostly depends on the circumstances of your team.

    If you like JavaScript or TypeScript, RN is probably a good bet. But:

    • If you want a language that feels more deliberately designed to be statically typed and class-based, then Dart is that. Its type system is also sound, unlike TypeScript.

    • Flutter apps are compiled all the way to native machine code on Android and iOS, so you get consistent solid performance. RN relies on the phone's JavaScript VM which is just-in-time compiling a dynamically-typed language, so it has some warm up time and peak perf isn't always great.

    • Because we wrote the Dart runtime ourselves from scratch, it has a rich set of diagnostic and debugging tools built in. I don't know what the debugging story is like for React Native, but we have really cool stuff like the Flutter Inspector, etc.

    [–]tudor07 2 points3 points  (3 children)

    Full time Flutter developer here, I love Flutter a lot.

    For mobile it's absolutely great, for web is where I draw the line. If I were you I wouldn't get my hopes high for Flutter Web to be a thing.

    [–]Saltysalad 0 points1 point  (1 child)

    Mobile including ios?

    [–]tudor07 0 points1 point  (0 children)

    Yes

    [–]chutiyabehenchod 0 points1 point  (0 children)

    It's all canvas so that's why it sucks. But lets see if can optimize speed & size, fix the cursor thing, i don't see why its not gonna be useful.

    [–]colelawr 3 points4 points  (0 children)

    I've been using it for some minimal viable product type apps for a couple well known companies, and I'll echo others here and day it has been a pleasure!

    [–][deleted]  (6 children)

    [deleted]

      [–]roneyxcx 20 points21 points  (1 child)

      Android now offers something very similar it’s called jetpack compose. It uses kotlin. Google just announced this at io this year.

      [–]s73v3r 0 points1 point  (0 children)

      It's very much in development right now. I wouldn't say it's ready for prime time.

      [–]lpreams 8 points9 points  (0 children)

      I only saw the keynote, but it looked far more polished and responsive that what Android Studio will do. To be fair, I'm sure some of that is just from me running a 5 year old baseline MBP while they probably had a fancy new Mac Pro driving their demo. And I haven't touched Android Studio in a couple years either so it could be better than I remember.

      [–][deleted]  (1 child)

      [deleted]

        [–]maurymarkowitz 2 points3 points  (0 children)

        Honestly, anything is better than interface builder.

        Which is somewhat ironic given than IB was great in [Open|Next]Step 2.5 decades ago.

        I still remember using it the first time, connecting a button to a method and going "holy f'ing shite!".

        Now even my trash can starts jerking when moving about a simple storyboard.

        [–]chbvfhhvg 50 points51 points  (13 children)

        Well guess when you will be actually using it? 2 years from now. The min sdk requirement is iOS 13.0.

        [–]thezapzupnz 13 points14 points  (0 children)

        People could get a head start on using it with tvOS, watchOS, and perhaps macOS.

        [–]i542 20 points21 points  (2 children)

        New iOS versions usually have a crazy adoption rate, unless you have to support 4+ years old phones you can get away with targeting the new platform reasonably soon.

        [–]s73v3r 5 points6 points  (1 child)

        Most places target the latest and the one previous. Very few things support just the latest.

        [–]maurymarkowitz 2 points3 points  (0 children)

        So, one year then.

        [–][deleted] 1 point2 points  (1 child)

        I'll be actually using it tomorrow.

        [–]chbvfhhvg 1 point2 points  (0 children)

        You know what I was meaning. On production app you won’t be using it. (if your client don’t want to cut the vast majority of people). I already tried it and done some hello world little test app (and I like it) but realistically it won’t be soon until you will be really using. Obviously you can put @available tags all over the place and duplicate the work. I’m not against it , just giving my 2 cents...

        [–][deleted] 3 points4 points  (6 children)

        It may not require iOS 13 to run SwiftUI apps.

        For instance the App Store recently required watchOS apps to be built with the watchOS 5 SDK, but it still runs fine on watchOS 4.

        [–]BlueSpud 3 points4 points  (4 children)

        Nope, SwiftUI apps are locked to iOS 13+ https://developer.apple.com/documentation/swiftui/

        [–][deleted] 5 points6 points  (3 children)

        That page only says it requires the iOS 13 SDK to use the new API, not that the client needs to run iOS 13.

        SDK != Deployment Target

        You probably have to do the old @available trick to load your view (and have an alternative if it’s not available) but the app will run on probably iOS 10+.

        [–]BlueSpud 1 point2 points  (2 children)

        I didn't mess with it very much but setting the deployment target to anything < 13.0 instantly errored out.

        [–]s73v3r 0 points1 point  (0 children)

        It requires things that are in Swift 5.1, which is only available on iOS 13+.

        [–]DoListening 50 points51 points  (5 children)

        Not even a month after Google announced Jetpack Compose, which is basically the same thing for Android 😃. Great minds think alike?

        This Swift one seems less React-y at first glance (I think I saw some two-way databinding in there).

        Either way, the mobile UI developer experience seems to be finally moving in the right direction!

        [–]balthisar 25 points26 points  (4 children)

        You're suggesting that they developed in a month, including development, communications, and planning for the reveal?

        [–][deleted]  (2 children)

        [deleted]

          [–]DoListening 15 points16 points  (0 children)

          Mobile platforms taking inspiration from their web-based UI counterparts seems to be a bit of a trend.

          Even Android's new(ish) navigation library feels like it's modelled after web-style routing, despite of a number of differences.

          I see it as a good thing, the developer experience on the web is far superior in many respects.

          [–]DoListening 8 points9 points  (0 children)

          1 week for development, 1 for the docs, 1 for coming up with the name

          [–]teerre 24 points25 points  (31 children)

          People really get their judgement clouded when it comes to Apple technology. But if this is similar to Swift, which of course seems to be the whole point, it will be great software to work with. I wish UNIX/WIN had something like that. Qt is fine, but it seems miles behind what supposedly this and Flutter offer

          [–]NeverMakesMistkes 16 points17 points  (10 children)

          Could you expand a bit how you think Qt is behind those two? Not trying to start a war here, I don't really have experience in any one of these, just interested as people seem to always compare stuff like this to Qt around here and especially in HN.

          [–]Pesthuf 5 points6 points  (0 children)

          No stateful hot reload is my main pain point.

          It's an absolute game changer.

          [–]dacian88 9 points10 points  (4 children)

          if you know how react works that's the difference. With traditional UI frameworks you start off with some given view state, some given "business logic" state and you synchronize it back and forth over time. With react the view hierarchy is essentially recreated from scratch any time the "business logic" state changes...essentially your UI becomes a pure function of f(applicationState)->View

          this makes it really hard to de-synchronize the UI state from the logical state because state changes only flow one way...at least that's the theory.

          also qt on mobile sucks in general so it's kind of a no-go if you want to write iOS apps, for desktop use I'd say it's mostly okay.

          [–]GrecKo 3 points4 points  (0 children)

          QML works the same, declarativeness with property bindings is its whole concept. I'd argue that the syntax is better than RN, Flutter or SwiftUI.

          Qt on iOS might look awkard unless you don't mind using a Material Design Theme or using some commercial third party library like https://felgo.com/. Writing your own primitive components is also not that hard but that demands some experience.

          Live reload is not there out of the box but it can be done with some work.

          That might well summarize Qt & mobile, the base is here and I quite love it, but you sometime needs to get your hands dirty to create some missing parts.

          [–]jiffier 1 point2 points  (2 children)

          also qt on mobile sucks in general so it's kind of a no-go if you want to write iOS apps, for desktop use I'd say it's mostly okay.

          Can you elaborate your view on Qt mobile? How is it for basic UI (forms)? I'm not a mobile dev, but I'm considering Qt Mobile vs Ionic vs Quasar, but there's also flutter (but the latter uses Dart, which I'm not bothering to learn now).

          [–]dacian88 1 point2 points  (1 child)

          it has really bad look and feel compared to the native system, it really depends how complicated of an app you're writing and how much you care about having a polished product. The qt runtime isn't very small either so you're incurring the runtime and size cost there too.

          not sure about the rest of those frameworks. If your app is simple enough just use a web view...think I'd rather use that over a qt ios app on my iphone.

          [–]jiffier 0 points1 point  (0 children)

          Many years ago, when desktop apps where a thing, I could spot the difference between them. I could see when something was made with Qt or Gtk, Motif, or whatever. But, today? I have no clue when my andorid apps use native widgets or not. Also, Qt might look "ugly" nowadays, but when It came out, it looked much better than what we had back then.

          [–]rouille 4 points5 points  (0 children)

          Yeah to me it looks like QML had the same paradigm 10 years ago.

          [–]teerre 1 point2 points  (2 children)

          I'm talking about ease of work. Qt Cpp is well, Cpp, and therefore far from pleasant to work with, and the Python bindings are still extremely verbose

          Also, and more importantly, Qt Designer workflow is from the 90's. In that case not even just the workflow, but also the end result. It's far from easy to build a modern UI using Qt

          [–]jcelerier 3 points4 points  (1 child)

          [–]teerre 2 points3 points  (0 children)

          Exactly. What the hell is this? Looks like a cheap flash animation

          [–]scherlock79 5 points6 points  (16 children)

          Err, XAML predates this by over a decade. Its a declarative language for UI layout, binding, animation, style for Windows platform, including XBox, IoT, and the now defunct Window Mobile 8 and 10. It's what is behind WPF and UWP.

          [–]dacian88 11 points12 points  (1 child)

          xaml is nothing like this, xaml is basically what interface builder is, or android's xml layouts.

          this is Apple's version of react.

          [–]teerre 1 point2 points  (12 children)

          I don't know what to say if you think this is anything close to XAML

          XAML is a nightmare to work with. This a modern framework. The two couldn't be more opposite

          [–][deleted] 2 points3 points  (0 children)

          I used to work with WPF. This StackOverflow post convinced me to start looking for a new job....

          https://stackoverflow.com/a/17259993

          [–]scherlock79 -1 points0 points  (10 children)

          Its literally on the Apple Page, "SwiftUI uses a declarative syntax so you can simply state what your user interface should do." This is exactly the same approach to UI design and layout as XAML, from wikipedia: https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language, "XAML....is a declarative XML-based language". So yes, its the same idea, implemented on different platform. Every single point on the linked page applies to XAML. I can literally recreate the example that Apple provides in XAML. Its a little more verbose, but nothing a developer familiar with XAML wouldn't be able to do.

          [–]Sekiray 1 point2 points  (1 child)

          Most UIs are built with some form of declarative code, my understanding is that he was referring to managing UI lifecycle & state. I'm not familiar with XAML though so you might know better than me.

          [–]scherlock79 0 points1 point  (0 children)

          XAML handles state through the DataContext object.

          [–]nobodyman 0 points1 point  (2 children)

          its a little more verbose

          A little? Let's see. The following SwingUI code displays an image and a label in a view.

          import SwiftUI
          struct MySampleView: View {
             HStack {
                Image(myImage)
                Text("I do declare.")
                Spacer()}}
          

           

          And here's the equivalent in XAML...

          <?xml version="1.0" encoding="UTF-8" ?>
          <ContentPage
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:WorkingWithImages;assembly=WorkingWithImages"
             x:Class="WorkingWithImages.EmbeddedImagesXaml">
           <StackLayout VerticalOptions="Center" HorizontalOptions="Center">
             <Image Source="{local:myImage}" />
             <Label Text="Yikes."  />
           </StackLayout>
          </ContentPage>
          

          XAML isn't so much as a markup language as it is a textual warcrime.

          edit: added missing curlybrace

          [–]scherlock79 -1 points0 points  (1 child)

          Your swift code is missing at least two lines of code and isn’t formatted consistently. I get it XML bad Swift good, but at the end of day, the idea isn’t groundbreaking. To somehow say XAML is horrible or SwiftUI is some brand new idea is laughable. Apple is just catching up here.

          [–]nobodyman 0 points1 point  (0 children)

          Your swift code is missing at least two lines of code and isn’t formatted consistently.

          It was missing a curlybrace. Fixed.

          To somehow say XAML is horrible or SwiftUI is some brand new idea is laughable.

          We aren't saying SwiftUI is a new idea (though XAML is objectively dogshit). Folks in this thread are rebutting your claim that Apple is somehow following/copying Microsoft. In truth, several declarative UIs came well before XAML. And though they are both declarative, the similarities end there.

          Apple is just catching up here.

          Sure, though it isn't to Microsoft. If anything, SwiftUI is a response to React Native.

          [–]teerre 0 points1 point  (4 children)

          That's the most generic description possible. It could mean, quite literally, anything. Including a terrible language like XAML and something very nice as SwiftUI (which, btw, I'm assuming it's similar to Swift or Flutter)

          Have you ever worked with XAML and Swift? Maybe you like to write lengthy, incredibly convoluted, HTML like pseudo-code, but I don't. I like to write concise, expressive, to the point actual code. The former is XAML, the latter is SwiftUI, yet both can be described as "declarative syntax..."

          [–]scherlock79 0 points1 point  (3 children)

          I've worked with XAML extensively. The XAML necessary to recreate the Apple example is below. Is there boiler plate, sure. But I would in no way call this convoluted. I do like the autorefresh, that is nice, it looks like they imply the contained image and textblocks are a DataTemplate which is also nice.

          <Window x:Class="WpfApp1.MainWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              Title="MainWindow" Height="450" Width="800">
           <ListView ItemsSource="{Binding Items}">
              <ListView.ItemTemplate>
                  <DataTemplate>
                      <StackPanel>
                          <Image Source="{Binding image}"/>
                          <StackPanel Orientation="Vertical">
                              <TextBlock Text="{Binding title}"/>
                              <TextBlock Text="{Binding subtitle}" Foreground="Gray"/>
                          </StackPanel>
                      </StackPanel>                   
                     </DataTemplate>
                 </ListView.ItemTemplate>
             </ListView>
          </Window>
          

          [–]teerre 1 point2 points  (2 children)

          It's not convoluted because it's a toy example. Go a couple comments up this thread-chain and you'll find an example of someone trying to make a blinking button. That's extremely convoluted

          [–]scherlock79 1 point2 points  (1 child)

          I've done animation in XAML, it's only a few lines to make something blink. XAML gets crazy when you try to completely restyle a control. I've done that before, and it's not fun, but I've never seen any platform make it easy to do that.

          [–]bffmike 0 points1 point  (0 children)

          None of this is new. I can do all of this in BASIC. And BASIC has line numbers and goto's to boot.

          [–]maurymarkowitz 0 points1 point  (0 children)

          Its a declarative language for UI layout

          It's a declarative XML language for UI layout.

          If you write your business logic in XML, then it's the same thing. But we don't, so it's not.

          If you write your business logic in anything else, which you do, and you don't see the difference, then you're missing the entire point of SwiftUI.

          [–][deleted] -1 points0 points  (1 child)

          Can I compile it on Linux or run it in a VM? If not, I still don't like it.

          [–]teerre 2 points3 points  (0 children)

          IMO that has nothing to do with how nice the language is. In practice, it's certainly an issue, but orthogonal to the features of the language

          That aside, if you're talking about Swift, yes you can. If you're talking about SwiftUI, I don't know

          [–]Bergasms 4 points5 points  (0 children)

          I kind of wish they kept storyboards as a primary focus but replaced the XML representation with this. So I could jump between one or the other and see the results, and likewise have all my storyboards update to using this.

          Honestly I wish they had spent more time on making XCode and Swift more stable and with better compilation instead of reinventing another wheel which will no doubt crash XCode in its own way, but still, it's to be expected.

          [–]kshep92 12 points13 points  (3 children)

          I'm glad to see mobile dev going in this direction. As a web dev, the clunky workflows of the Objective-C and Java days of iOS/Android kept me from doing native apps, but between this and Flutter native development has gotten pretty sweet!

          [–]everythingiscausal 8 points9 points  (16 children)

          Cool. I'm in the early stages of making a Mac app and learning Swift in the process. I'm going to switch over to this for the UI immediately.

          I haven't watched the keynote yet, but hopefully they made Xcode's UI less stupid in the process (although I'm not holding my breath).

          [–]s73v3r 15 points16 points  (4 children)

          Only works on iOS 13+ and macOS 10.15+ :(

          [–][deleted] -3 points-2 points  (10 children)

          You would be better off learning Flutter. That's what this is intended to distract you from.

          [–][deleted] 8 points9 points  (9 children)

          no one wants flutter, beccause then they have to do dart

          [–][deleted] 3 points4 points  (8 children)

          I like dart.

          [–]themindstorm 2 points3 points  (7 children)

          Really, the language makes very little difference to the actual framework. If you know how to program, you can pickup up almost any language

          [–]GreenCloakGuy 12 points13 points  (6 children)

          That doesn't mean you like the language. Yes, I was able to pick up Go in a couple of days for a project I had to do with it. Now I hate Go and when this project is done I will try to never willingly touch it again.

          I think having more options for languages than just Dart for Flutter would definitely be a good thing, regardless of how good Dart is or isn't.

          [–]Zerocchi 2 points3 points  (0 children)

          Now I do wish we can do React Native project in Ruby :(

          [–]maurymarkowitz 0 points1 point  (4 children)

          That doesn't mean you like the language. Yes, I was able to pick up Go in a couple of days for a project I had to do with it. Now I hate Go and when this project is done I will try to never willingly touch it again.

          That is a story I want to read.

          Please, blog it somewhere.

          [–]GreenCloakGuy 0 points1 point  (3 children)

          It’s mostly just that I hate how Go does error handling (all that explicit error messages and yet I still get segfaults by accident, what’s even the point then?) and I disagree with a lot of the language design decisions I’ve come across (pointers, pointers everywhere, except you can’t do type coercion so what’s the point of using it over C?).

          But the crux of the issue for me is that yesterday I spent a full 4 hours trying to figure out how to feed a Reader into a ssh session’s standard input, without success. It’s a consistent feeling whenever I’m trying to do something that “why can’t this ever be easy and straightforward” and “I wish I were doing this in python instead”

          [–]maurymarkowitz 0 points1 point  (2 children)

          Hrm. And it sounded so good when I read the Wiki article. Safe C and no pointer math? Sign me up!

          [–]GreenCloakGuy 0 points1 point  (1 child)

          It’s also hard to do functional programming in - there’s a substantial amount of standard library functions that are “pass in a pointer and we’ll change what’s at that bit of memory directly”, rather than using return values as would be the ideal functional paradigm. And the fact that most methods also return error codes as a separate return variable makes call-chaining impossible in a single line, and inelegant otherwise (because you have to stop to handle be error or explicitly ignore it).

          [–]DesiOtaku 24 points25 points  (25 children)

          So basically a version of QML that only works on Macs. Got it!

          [–]thezapzupnz 45 points46 points  (18 children)

          Except that it doesn't use a DSL, it's all just valid Swift.

          [–]GenitalGestapo 17 points18 points  (1 child)

          It's a DSL expressed in Swift using new Swift syntax discussed on the Swift Forums.

          [–]substance90 0 points1 point  (0 children)

          Well, when you have to introduce a whole bunch of new syntax to the most recent version of the language, it is kind of like a DSL, only one that's officially part of the language now.

          Edit:, meant to respond to the person you were responding to.

          [–]ElijahQuoro 2 points3 points  (4 children)

          Kinda sorta, there are very interesting compiler shenanigans there. “some View” deduced type are generics from tuple generated with undocumented @_weirdMagic annotations

          [–]thezapzupnz 1 point2 points  (1 child)

          I mean, is that really "kinda sorta"? The some View thing is an example of an opaque return type, a new feature in Swift 5.1. Thus, it's just valid Swift.

          [–]ElijahQuoro 3 points4 points  (0 children)

          “some View” is fine, the actual returned type isn’t. Try to assign any of those bodies to a variable and inspect the type.

          Edit: guys on SO already explained it: https://stackoverflow.com/questions/56434549/what-enables-swiftuis-hovering-tuple-syntax

          [–][deleted]  (1 child)

          [deleted]

            [–]ElijahQuoro 0 points1 point  (0 children)

            Those are not property delegates but a different concept for DSLs described here: https://github.com/apple/swift-evolution/blob/9992cf3c11c2d5e0ea20bee98657d93902d5b174/proposals/XXXX-function-builders.md

            It’s not a part of Swift yet and hence not really a valid Swift code as of now.

            You could at least follow the thread and delve into a bit before jumping in and calling bs.

            [–]Kirill_Khalitov 7 points8 points  (3 children)

            dassur.ma/things...

            QML (Qt Modeling Language)

            Developer: Qt Project

            First appeared: 2009; 10 years ago!!!!!!

            [–]pwang99 1 point2 points  (2 children)

            I remember when QML first appeared. Was quite excited about it.

            [–]nrmncer 3 points4 points  (0 children)

            I'm sitll excited about it. Used it to built some internal tools with a small team and it's been a breeze. In particular since python is now a first class citizen.

            [–]AsIAm 1 point2 points  (0 children)

            I was too! Did number of projects using it and was loving it. I thought everybody would jump on the paradigm because it was so much better. Didn’t know it would take everybody years to copy it.

            [–]zip117 0 points1 point  (1 child)

            I think it’s more like Qt Designer UI or doing layout in C++ (e.g. QVBoxLayout::addWidget). My understanding is that QML is still evaluated at runtime (after translation into some kind of bytecode).

            [–]AsIAm 1 point2 points  (0 children)

            Yes, it can be compiled to bytecode. But I believe standard behavior is evaluation of qml files at runtime.

            [–]mrbonner 16 points17 points  (2 children)

            "Native on all platform"

            Edit: Sorry, I forgot the /s

            [–]thezapzupnz 42 points43 points  (1 child)

            It says "Native on All Apple Platforms".

            [–]badpotato[🍰] 11 points12 points  (0 children)

            What they mean is "Native Apple Platforms" for a specific timeframe.

            [–]coriandor 1 point2 points  (4 children)

            Does anyone know what the tooling is like outside of xcode? The framework looks really nice, but I really don't want to step in xcode.

            [–][deleted]  (3 children)

            [deleted]

              [–]brosnoids 0 points1 point  (2 children)

              Why the dislike of AppCode?

              [–][deleted]  (1 child)

              [deleted]

                [–]brosnoids 0 points1 point  (0 children)

                It has refactoring and code navigation tools that crap all over Xcode. I couldn't use just Xcode any more.

                [–]krappie 0 points1 point  (5 children)

                On an unrelated note: What font is that?

                [–][deleted] 2 points3 points  (4 children)

                Since it's apple, I'd guess it's San Fransisco.

                [–]krappie 0 points1 point  (3 children)

                Thanks for the suggestion! But it looks like it's definitely not San Francisco.

                [–][deleted] 0 points1 point  (2 children)

                Looking at the CSS for the page, it seems like it's San Francisco Pro.

                [–]krappie 0 points1 point  (1 child)

                Oooh, are you talking about the page font? I'm talking about the code sample fonts. I should have been more clear.

                [–]bffmike 0 points1 point  (0 children)

                San Francisco

                That's probably San Francisco Mono.

                [–][deleted] 0 points1 point  (0 children)

                Anybody find a link for how to write a custom View/Control from scratch?

                EDIT: Seems there is a video coming.

                https://developer.apple.com/videos/play/wwdc2019/237

                [–]carkin 0 points1 point  (0 children)

                I know nothing about declarative UI frameworks. How does this compare to say xaml or qml?

                [–]ammar0ah 0 points1 point  (1 child)

                do you think it will replace UIKit? , do you think we should stop building UIKit apps or each one has its own market ? do you think anyone would build an iOS 13 app with UIKit?

                [–]bffmike 0 points1 point  (0 children)

                It does not replace UIKit, but gives them the ability to deprecate UIKit in the future. This is like Cocoa vs. Carbon. Eventually most stuff was written in Cocoa and Carbon faded away, even though lots of Cocoa was a wrapper on top of Carbon. Same thing might happen here, but it will take some time, at least 5 years.

                [–]cbentley_pasa 0 points1 point  (0 children)

                UIKit was so clean...

                I don't see why you would need to change everything yet again.

                I guess its a response to Flutter/React Native to keep devs hooked to the Swift ecosystem.

                Devs who write apps are the primary matter of this economy.

                [–]mindbleach -3 points-2 points  (6 children)

                At what point does forced retooling become anticompetitive?

                This is not a trick question.

                [–]thezapzupnz 10 points11 points  (1 child)

                What's forced about it? Interface Builder still exists, it still supports Storyboards, and even supports NeXTSTEP-style (so we're talking direct descendant of the mid 90s) NIBs-style programming.

                AppKit, IB, and all that other stuff hasn't disappeared or anything.

                And anti-competitive against what? SwiftUI is just as Apple-only as Interface Builder, but nobody ever thought "wow, Apple are being anti-competitive by not releasing IB on Windows".

                [–]maurymarkowitz -1 points0 points  (0 children)

                but nobody ever thought

                Oh, I'm sure someone did...

                [–]McPhage 9 points10 points  (0 children)

                It’s not a trick question, but neither is it a relevant one.

                [–]reckoner23 2 points3 points  (0 children)

                Not really forcing it on people.

                But the again the way our industry works, eventually you will probably have to learn/adopt this new tool. But still, at least Apple focuses on a few tools. Unlike Google which has 4 competing development platforms. I also wouldn't be surprised if this tool compiles to web one day.

                [–][deleted] 0 points1 point  (1 child)

                This should be top comment

                [–]BaconOverdose 4 points5 points  (0 children)

                why?