5 ms·
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
by greenhouse_gas 8y ago
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 actually worse than Java (threads are extremely heavy weight, every interaction with native code is async and slow).
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.
- eksemplar 8y agoI have a different view on it, I actually like Dart. I like the strong types and how the language is more suited for enterprise development than both typescript and JavaScript. 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.
- k__ 8y agoMaybe Dart is simply better than C#/Java but worse than Kotlin?
- mixedCase 8y ago>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 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.
- eksemplar 8y agoI 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.
- mixedCase 8y ago>I think it’s an improvement over [...]Typescript JS I understand, but what makes you prefer Dart over TypeScript in this case?
- korm 8y agoHere 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
- rhodysurf 8y agoAgree the language is the worst part. Honestly if Dart has extensions like Swift and Kotlin, and rust (I think) I would be satisfied though.
- mythz 8y agoExtensions is also my #1 most missed language feature! Wasn't possible before when Dart was dynamically typed, but perhaps now with Dart 2's strong mode we'll see it in future.
- buremba 8y agoA fair comparison would be with JS as all the other alternatives use JS.
- greenhouse_gas 8y agoOr languages that compile to JS (like TypeScript). Maybe one day we'll get languages compiling to Dart[1]. [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.
- munificent 8y agoI'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 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-null-safety-in-dart/ http://journal.stuffwithstuff.com/2011/10/29/a-proposal-for-...
- greenhouse_gas 8y agoThe thing is that the longer you wait, the harder it will be to migrate, as the codebase size grows (and once you leave beta, people assume that the language is finalized and won't be too happy being forced to refactor their code when Dart 3 comes out). But as it is, I doubt that the nice parts of Kotlin will ever make it to Dart.
- k__ 8y agoYes, it's really sad that a language as young as Dart already has such problems :/
- greenhouse_gas 8y agoIt's because the language was made to compile to JS, and competition to JS, so appropriate tradeoffs were made. For example: 1. JS is single-threaded, with extremely heavy threads only recently made available. So Dart is single threaded, with extremely heavy threads available. 2. JS is weak-typed, so Dart was made optional typed. Remember, it was made before typescript, so they probably didn't expect that such type-heavy features as ADT would interest people. Kotlin does the same (for example, internal immutability would be much nicer, but since the JVM doesn't support that, neither does Kotlin).
- georgewfraser 8y agoOn (2), there is a Kotlin language server in progress: https://github.com/fwcd/KotlinLanguageServer https://github.com/fwcd/KotlinLanguageServer
- _pmf_ 8y ago> 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.