Live data from Hacker News

Announcing Flutter Release Preview 1

medium.com

71–80 of 86 posts

Re: Announcing Flutter Release Preview 1

#71
post #4

I've been using Flutter for a few months now, and have not felt this productive in years. Being able to iterate so quickly on real or virtual devices has changed how I design and development a UI. I can set out with a mock-up and almost immediately start to feel why it isn't perfect and just use it until the feel is right. The productivity bonuses are sometimes hard to explain to people who haven't yet tried Flutter…

Dart is by far the most productive cross-platform web technology I've ever worked with. We got the same (quite complex due to the domain requirements) core codebase for web client, IOS, Android, and on the server side is well. Had we chosen to go with the more traditional combination, the effort to keep everything in sync would rise exponentially with the complexity of the project.

Now I wish dart had nullability support.

Re: Announcing Flutter Release Preview 1

#72

Earlier quoted context omitted.

I think you misunderstood me. I don’t think it’s an improvement over c# (or Kotlin, but I have no experience with Kotlin so I wasn’t commenting on that). I think it’s an improvement over JavaScript, Typescript and the Xamarin experience + tooling, with the added advantage of letting you share language in your clients. I don’t think dart is great though, it’s just better than the terrible alternatives.

>I think it’s an improvement over [...]Typescript JS I understand, but what makes you prefer Dart over TypeScript in this case?

Here are my personal opinions as a long time Dart/JS/TS developer.

- Dart had a lot of features before either JS or TS. Important features like cancellable promises or optional chaining are still missing (I know they might be coming soon). Also some nice quality of life features like named constructors.

- As a superset of JS, Typescript has a lot of idiosyncrasies that might bother people. Personally I don't mind, but people new to web development often find Dart to be a friendlier experience, with fewer pitfalls.

- To me, and this is very subjective, the TS syntax is uglier than either JS or Dart. The types get in the way and add noise to the code. I find Dart's and pretty much any other language's type declarations much cleaner.

However, I have two very big problems with Dart that prevent me from using it as much as I'd like to.

- JS interop is much much cleaner in Typescript/Flow. Every compiled-to-JS language that isn't a superset suffers from this. It's what prevents me from using ReasonML seriously too.

- No support for JSX. I can't go back to writing nested createElement after using JSX

Re: Announcing Flutter Release Preview 1

#73

Earlier quoted context omitted.

>is more suited for enterprise development than both typescript and JavaScript. What makes you think this given the library and tooling situation? Is this strictly a "worse is better" thing where lacking modern language features is a plus (at which point I'd argue for Java) or is there a Dart feature that makes you think it's actually an improvement over TypeScript, Kotlin, .NET Core (both C# and F#) or Rust (just to…

I think you misunderstood me. I don’t think it’s an improvement over c# (or Kotlin, but I have no experience with Kotlin so I wasn’t commenting on that). I think it’s an improvement over JavaScript, Typescript and the Xamarin experience + tooling, with the added advantage of letting you share language in your clients. I don’t think dart is great though, it’s just better than the terrible alternatives.

TypeScript has ADTs, non-nullable types and the tooling is one of the best (great autocomplete, support for refactorings, incremental compilation, yarn is a great package manager, etc).

Its type system is also one of the most advanced in mainstream languages, being inferior only to Scala and Haskell.

In comparison, Dart doesn't have ADTs or non-nullable types. For a new language, I consider this very underwhelming.

I'm considering using Flutter for a new project because it seems to be a great platform, but having to use Dart instead of TypeScript is a step backwards.

Re: Announcing Flutter Release Preview 1

#74

Unfortunately, I kind of feel torn: On one hand, I love flutter as a concept[1]. It removes a lot of the baroque from mobile development (no need for the whole RecyclerViewer construction for every list! No Fragments! Doesn't require Android Studio to start working!) but I hate the language (dart). After using Kotlin (let alone Rust), It feels like moving back to Java (no non-nullable types) and in some ways it's act…

I'm on the Dart team (though I wouldn't necessarily take my comment to be an official statement of the entire team). > (no non-nullable types) I really wanted [1] to get those into Dart 1 (way back before Swift and TypeScript even existed), but I couldn't convince language team at the time that it was worthwhile. When we moved to a stricter, sound type system with strong mode, we hoped to get non-nullable types into…

From what I've seen how apple did it:

1. They added optional nullability syntax to objective-c, a language that assumes everything is null and doesn't crash when you send a message to nil. If your file uses nullability, it's required for the file, otherwise you don't have to use it. Code without nullability annotations using non-null annotated code could interface with the non-nullable code. Errors didn't come up unless you did very obvious things like directly put nil in a non-null argument.

2. They migrated their entire apple library base to have proper nullability annotations. Code that didn't have nullability annotations continued to work fine. Or I think you could just turn off the build error with a compiler flag.

3. Apple introduced swift. Any objective-c code that didn't have nullability defined was assumed to be an implicitly unwrapped non-null. So if you give a null to something not expecting a nil in swift, it would crash.

Apple has a blog article specifying it further here: https://developer.apple.com/swift/blog/?id=25

-----

I liked this approach for the most part. Migration wasn't that much of a pain, and it was incentivized because I didn't want implictly unwrapped stuff in my swift code.

If you migrated the flutter framework and the dart stdlib to have nullability, then new projects can start with proper nullability annotations from the start, while old projects can progressively migrate files as needed.

Java also has a nullable syntax annotation, and kotlin probably has some sort of java-kotlin nullability interop somewhere. I would really suggest doing it, nullability has given big stability benefits to large projects as it is, and would help adoption in the future as people using something like kotlin & swift for new projects vs flutter itself.

Re: Announcing Flutter Release Preview 1

#75

Unfortunately, I kind of feel torn: On one hand, I love flutter as a concept[1]. It removes a lot of the baroque from mobile development (no need for the whole RecyclerViewer construction for every list! No Fragments! Doesn't require Android Studio to start working!) but I hate the language (dart). After using Kotlin (let alone Rust), It feels like moving back to Java (no non-nullable types) and in some ways it's act…

I'm on the Dart team (though I wouldn't necessarily take my comment to be an official statement of the entire team). > (no non-nullable types) I really wanted [1] to get those into Dart 1 (way back before Swift and TypeScript even existed), but I couldn't convince language team at the time that it was worthwhile. When we moved to a stricter, sound type system with strong mode, we hoped to get non-nullable types into…

Sad to see optional typing go. I thought that's the best of both worlds -- you can write type annotations for documentation or checking, but you also have the benefit of dynamic typing when static typing comes in the way.

Re: Announcing Flutter Release Preview 1

#76
post #62

Just noticed that https://flutterstudio.app/ only works properly on Chrome, what a surprise.

Given that flutterstudio.app isn't made by Google, I'm not sure what you're implying.

I am implying that the generation that complained about "This works best on IE" is now responsible for "This works best on Chrome", just now it isn't a problem because Google is cool.

Re: Announcing Flutter Release Preview 1

#77
post #2

I'd love to play with Flutter but issues like this keep me at arm's length. Hopefully when this kind of thing is finally resolved I'll be able to give it a closer look. https://github.com/flutter/flutter/issues/6827

To summarize, Flutter provides no automated or easy means to save/restore state when Android auto-kills the app (e.g. because of low memory). The main problem here is that the `onSaveInstanceState` and `onRestoreInstanceState` lifecycle callbacks require a synchronous response (return value) but the IPC system between Dart and native code is inherently asynchronous.

React Native currently has the very same problem. This is the reason why some very useful native components that require synchronous delegate callbacks (such as UITableView and UICollectionView from iOS) are not available from RN. However, the core team at Facebook is working on a "large re-architecture" that will allow synchronous calls into JS, fixing these issues:

https://facebook.github.io/react-native/blog/2018/06/14/stat...

Re: Announcing Flutter Release Preview 1

#78

Unfortunately, I kind of feel torn: On one hand, I love flutter as a concept[1]. It removes a lot of the baroque from mobile development (no need for the whole RecyclerViewer construction for every list! No Fragments! Doesn't require Android Studio to start working!) but I hate the language (dart). After using Kotlin (let alone Rust), It feels like moving back to Java (no non-nullable types) and in some ways it's act…

> It removes a lot of the baroque from mobile development (no need for the whole RecyclerViewer construction for every list! No Fragments!

The Android API sets the bar really, really low for improvements.

Re: Announcing Flutter Release Preview 1

#79
post #72

Earlier quoted context omitted.

>I think it’s an improvement over [...]Typescript JS I understand, but what makes you prefer Dart over TypeScript in this case?

Here are my personal opinions as a long time Dart/JS/TS developer. - Dart had a lot of features before either JS or TS. Important features like cancellable promises or optional chaining are still missing (I know they might be coming soon). Also some nice quality of life features like named constructors. - As a superset of JS, Typescript has a lot of idiosyncrasies that might bother people. Personally I don't mind, bu…

I thought reasonml's JavaScript interoperability was quite good, seems to compile faster and the type system cannot lie about it's inferences like it can in TS

But the main thing for me between TS and reason is exhaustive pattern matching is better in reason, it feels jacky in TS

could I use reasonml/js with flutter widgets and ignore dart?

Re: Announcing Flutter Release Preview 1

#80
post #23
post #19

Earlier quoted context omitted.

> Facebook only cares about resolving their own issues One could argue that Google suffers from this weakness as well.

Hasn't been my experience with Flutter, it looks like a well resourced project with a very talented team who are committed at building a high-quality and productive tool for developing Mobile Apps and are actively supporting their existing user base. React Native feels like an in-house development project they've open sourced but don't have the resources to resolve external issues so they've instituted a policy of ro…

This has been my experience exactly. Flutter devs quickly answering stack overflow or gitter questions.

With React Native I found the little touch 'click' sound wasn't working on Android. Someone had raised a bug and provided a patch years ago but Facebook still hadn't included it.

Post reply on HN