Hacker News new | ask | show | jobs
by eksemplar 2925 days ago
I 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.

2 comments

>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.

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.

>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

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?

Maybe Dart is simply better than C#/Java but worse than Kotlin?