(no title)
greenhouse_gas | 7 years ago
I wish there was:
1. A good Kotlin language server (unlikely, as the company behind the language is an IDE company).
2. A good reactive Kotlin GUI library (meaning, with the ergonomics of Flutter (as in, I don't have to work with Fragments and their lifecycles, just use views)).
3. A good JVM interpreter (to speed up Kotlin/Java compilation)
[1]. No I don't use Flutter to "write two apps for the price of one", as most (of my) apps are just a front-end over a back-end server, so they don't have any special logic worth saving between iOS and Android. I just find Flutter easier to work with relative to Android.
munificent|7 years ago
> (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 that and ship them with Dart 2. But, as you can imagine, migrating millions of lines of code from an optionally typed, unsound type system to a sound, reified static type system is a hell of a lot of work. (I'm not aware of any cases where it's been done at this scale.)
We weren't able to fit non-nullable types into that schedule and into our users' migration pain tolerance. There is only so much you can drag them through, and just getting to strong mode was a lot.
There is still a desire to bring non-nullable types to Dart. It probably won't be soon because we want to give our users a break from migration, and give our implementation teams time to take advantage of the new type system. But I haven't given up on them, and our team's new focus on static ahead-of-time compilation makes them more important than ever.
I agree that Kotlin is a really nice language. I hope we can catch up to them with Dart and exceed them in areas.
[1]: http://journal.stuffwithstuff.com/2011/10/29/a-proposal-for-...
greenhouse_gas|7 years ago
woolvalley|7 years ago
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.
bsaul|7 years ago
LegNeato|7 years ago
Facebook has done it twice at this scale: PHP -> Hack, plain JS -> Flow JS.
zerr|7 years ago
kartickv|7 years ago
eksemplar|7 years ago
There is the added benefit of being able to reuse assets from your mobile app in AngularDart, which I suspect may see an increase in use along with flutter.
I’m not coming from Kotlin or rust though, but a .net core backend with JavaScript on the front end and Xamarin for apps. I can definitely see us move from AngularJS and Xamarin to flutter and AngularDart though as this move would be a nice improvement.
I’m not too worried about the lack of available projects and libraries on dart compared to say JS, as we typically wouldn’t include some one man hobby project anyway.
That being said, I think we’ll wait and see what happens throughout 2018.
mixedCase|7 years ago
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 avoid adding more languages to what you mentioned) for enterprise development?
I'm frankly astonished at seeing how something that I see as an extremely clear step backwards as far as languages go is getting so much traction; not sure if it's just because Flutter is that good a tool (in which case I'd think we should be aiming to make the native core available to other languages) that people are willing to root for the whole package or if there's something else.
k__|7 years ago
georgewfraser|7 years ago
buremba|7 years ago
greenhouse_gas|7 years ago
[1]. Although it'll be a pity. JS is stuck as a compilation target because it's a standard, and it's old, and even then wasm may one day take over JS. Flutter could have been a library, and one could have written in Go or Rust or Java with Flutter bindings. As it is now, I don't know if its possible.
rhodysurf|7 years ago
mythz|7 years ago
_pmf_|7 years ago
The Android API sets the bar really, really low for improvements.