Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

171–180 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#171
post #155

Earlier quoted context omitted.

I could be wrong, but I don't believe the existence of Go was much of a problem. Go and Dart are very different languages aimed for very different use cases. If anything, I think Go helped us because we could point to it as a successful language that Google hasn't cancelled. > not that far from Java This is something that hurt us, I think. You can write Dart code that looks a lot like Java, and many of our early publ…

I removed everything that seems redundant. Less syntax means less to break, and less for new programmers (who are 10x the volume of existing programmers) to learn: import 'package:hauberk/src/engine.dart' import 'package:hauberk/src/content.dart' content = createContent() save = content.createHero("blah") while (true) watch = Stopwatch() watch.start() # Generate a dungeon at each level. count = 0 for (i = 1; i = -1)…

how are the semicolons in a for loop redundant? Without them it's extremely difficult to parse what's going on.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#172

Earlier quoted context omitted.

I could be wrong, but I don't believe the existence of Go was much of a problem. Go and Dart are very different languages aimed for very different use cases. If anything, I think Go helped us because we could point to it as a successful language that Google hasn't cancelled. > not that far from Java This is something that hurt us, I think. You can write Dart code that looks a lot like Java, and many of our early publ…

> I could be wrong, but I don't believe the existence of Go was much of a problem. It wasn't so much Go per se, but the fact that Google was pushing two new languages at the same time. It created the perception, for me at least, that Google was pushing out new languages to see which ones stuck and kill those that didn't. Google had/has the reputation for killing off projects that it lost interest in. And I wasn't wil…

Totally agree. Also, Go was refreshing. Intentionally limited, yes, but simple-yet-powerful. Then they show off Dart and it looked like yet another 90's-style curly-brace language, and I'm sure I'm not the only one who asked "why bother?".

Re: Announcing Dart 2 Stable and the Dart Web Platform

#173
post #36

Reading the few comments here is really interesting. Every-time there is a discussion about Dart , people talk about Flutter... they very rarely talk about Dart on the Server or on the Web... A while ago I considered using Dart to build a Web API. I was shocked by the non-existent ecosystem around this language. The Redis package has been un-maintained for almost three years now, and Angular Dart is always a few vers…

It just doesn't provide enough value over Flow or TypeScript for most people. I'd love to use Flutter, but the tools I want to build I need to be desktop apps. Not everybody is focused on the app store gold rush.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#174
post #155

Earlier quoted context omitted.

I could be wrong, but I don't believe the existence of Go was much of a problem. Go and Dart are very different languages aimed for very different use cases. If anything, I think Go helped us because we could point to it as a successful language that Google hasn't cancelled. > not that far from Java This is something that hurt us, I think. You can write Dart code that looks a lot like Java, and many of our early publ…

I removed everything that seems redundant. Less syntax means less to break, and less for new programmers (who are 10x the volume of existing programmers) to learn: import 'package:hauberk/src/engine.dart' import 'package:hauberk/src/content.dart' content = createContent() save = content.createHero("blah") while (true) watch = Stopwatch() watch.start() # Generate a dungeon at each level. count = 0 for (i = 1; i = -1)…

Separating variable declaration and reassignment at a glance makes code more clear. Indenting loop bodys makes code more clear, and the curly braces won't suddenly break. Keeping lines short makes it nicer to work with in various editor setups.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#175

Who’s using Dart for Web (angular dart?). I’m interested in hearing pro’s / con’s especially if you have any experience with react as well. Thanks!

I work for Google on Search Ads 360 (formerly DoubleClick Search). All the frontend code I write uses Angular Dart and I love it. The best thing about it is the Intellij integration. I've never worked with an editor with semantic auto complete and jump to definition, so it's unbelievably awesome. Static analysis catches tons of errors, dev cycle is super short even for our giant codebase.

I have some experience with React. My impression is that the React model is easier to understand and use at first, but may run into issues as the project grows. I have only ever worked on solo projects from scratch in React, and only ever on multiple 100k loc projects in Angular Dart.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#176
post #126

I'm really not a fan of Dart's type system. It feels ancient to me. From what I can tell, there's no sum types, I don't see any way to bound generics based on interface/typeclasses/traits or some other equivalent concept on the docs, it has no non-nullable types. Am I wrong? Why would I want to use a type system that lacks expressiveness?

> From what I can tell, there's no sum types

Paraphrasing Qc Na: Subclasses are a poor man's sum type. Also, sum types are a poor man's subclasses.

:)

But, yes, some nicer notation for declaring a sealed family of types would be nice along the lines of case classes in Scala. It's something we've talked about a bunch but haven't had time to get to yet.

> I don't see any way to bound generics based on interface/typeclasses/traits

It uses the same syntax as Java:

    class Foo {
      T thing;
      method() { thing.methodOnBar(); }
    }
> it has no non-nullable types.

Not yet. :( I hope we can get to them.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#177
post #36

Reading the few comments here is really interesting. Every-time there is a discussion about Dart , people talk about Flutter... they very rarely talk about Dart on the Server or on the Web... A while ago I considered using Dart to build a Web API. I was shocked by the non-existent ecosystem around this language. The Redis package has been un-maintained for almost three years now, and Angular Dart is always a few vers…

With Google’s history of abandoning efforts like this, I wouldn’t spend too much effort using any language developed by them.

Adwords frontend was completely rewritten in Dart. It's not going anywhere anytime soon.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#178
post #174
post #155

Earlier quoted context omitted.

I removed everything that seems redundant. Less syntax means less to break, and less for new programmers (who are 10x the volume of existing programmers) to learn: import 'package:hauberk/src/engine.dart' import 'package:hauberk/src/content.dart' content = createContent() save = content.createHero("blah") while (true) watch = Stopwatch() watch.start() # Generate a dungeon at each level. count = 0 for (i = 1; i = -1)…

Separating variable declaration and reassignment at a glance makes code more clear. Indenting loop bodys makes code more clear, and the curly braces won't suddenly break. Keeping lines short makes it nicer to work with in various editor setups.

> Separating variable declaration and reassignment at a glance makes code more clear.

Hrm, maybe. Python does well not using them - if you reassign something, it's being reassigned. Maybe, since declaration is more common, make declaration the default and reassignment explicit?

> Indenting loop bodys makes code more clear

Glad you agree.

> curly braces won't suddenly break

They do all the time, everytime indentation (how people read coe) gets out of sync with braces. Hence avoiding redundancy.

> Keeping lines short makes it nicer to work with in various editor setups.

Displaying code to match the screen is the editors job. Sometimes your screen is 30 characters, sometimes it's a lot more.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#179
post #155

Earlier quoted context omitted.

I removed everything that seems redundant. Less syntax means less to break, and less for new programmers (who are 10x the volume of existing programmers) to learn: import 'package:hauberk/src/engine.dart' import 'package:hauberk/src/content.dart' content = createContent() save = content.createHero("blah") while (true) watch = Stopwatch() watch.start() # Generate a dungeon at each level. count = 0 for (i = 1; i = -1)…

how are the semicolons in a for loop redundant? Without them it's extremely difficult to parse what's going on.

Typo when removing the others. Thanks for the spot. Maybe a forEach or map might be more appropriate for all those future programmers anyway though.
Post reply on HN