Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

221–230 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#221

Earlier quoted context omitted.

> A language by itself is almost never useful, every language needs a killer app, I don't understand why this myth is still around. C++ never had a killer app to start its momentum. Neither did Javascript. Nor Java really (or maybe applets, back in the days?). Languages can succeed on technical merits alone if they come out at the right time and fix real problems that programmers experience on current mainstream lang…

Golang and Rust also didn't have any killer app.

Go has a bit of a niche, and Rust is trying real hard, but they aren't Javascript or Java, or C#, or Python, or Rails, or PHP, or C++, or Objective-C or... Out in the wider world, they are very much playing catchup, and have a very far way to go.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#222
post #124

Earlier quoted context omitted.

I think a lot of what people found off-putting about Dart is that Google already recently came out with a new language that has become very successful. Announcing another one, which at first glance looks like yet another curly brace language not that far from Java, was a step too far for people to be interested. Nowadays, the only thing driving Dart seems to be Flutter, which again is head-scratching. Like, "Flutter…

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…

Yes it is a little nicer than Java 11, but not so much to really make a difference, while throwing away all the Maven central goodies.

    import engine.*;
    import static content;

    import static java.lang.System.out;

    public class Demo {
        public void main(String args[]) {
            var content = createContent();
            var save = content.createHero("blah");

            while (true) {
                var start = System.currentTimeMillis();

                // Generate a dungeon at each level.
                var count = 0;
                for (var i = 1; i = -1) count++;
                }

                var stop = System.currentTimeMillis();
                var elapsedMilliseconds = start - stop;
                out.printf("Generated %d dungeons in %dms\n", count, elapsedMilliseconds);
            }
        }
    }

Re: Announcing Dart 2 Stable and the Dart Web Platform

#223
post #196
post #154

Earlier quoted context omitted.

> I do think it's a good bit simpler and cleaner than it would be in Java. Is it really? My Java is rusty, but now that Java has type inference it looks nearly exactly like what you'd type in Java (minus `public static void`, `new`, etc.)

Java 10 only has type inference for method-scoped vars.

Java 11 is around the corner and has improved upon it.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#224
post #132

Earlier quoted context omitted.

A language by itself is almost never useful, every language needs a killer app, a concrete tangible thing that that language can do better 100x better than any alternative. Like how Ruby had Rails or JS had browsers or Python has ML. That’s not to say you can’t do other things with these, just that their competitor is good enough and has momentum and mind share. It sounds like Dart now has Flutter and I think that’s…

> A language by itself is almost never useful, every language needs a killer app, I don't understand why this myth is still around. C++ never had a killer app to start its momentum. Neither did Javascript. Nor Java really (or maybe applets, back in the days?). Languages can succeed on technical merits alone if they come out at the right time and fix real problems that programmers experience on current mainstream lang…

> C++ never had a killer app to start its momentum.

C++ was immediately adopted by all major C compiler vendors as it came from AT&T as well.

Microsoft C/C++ 7.0 for MS-DOS was the very last one to adopt C++ on the toolchain.

It was the lingua franca of all major desktop OS GUI frameworks, leaving C just for their lower layers, MS-DOS (Turbo Vision), OS/2 (C/Set++), Windows (OWL, VCL, MFC), Mac OS (PowerPlant, MacApp), BeOS, Symbian.

If you were doing plain C GUI programming you were doing it wrong.

> Neither did Javascript.

JavaScript owns the browser, there is hardly any other alternative regarding "browser systems programming".

> or Java really (or maybe applets, back in the days?).

Java's portability was a gift compared with C compilers still in the middle of migrating from K&R C to ANSI C, C++ compilers which were silos with their GUI frameworks and a standard still a couple of years away to be fully defined.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#225

Earlier quoted context omitted.

I think you need at least one of three things to get a new language off the ground: 1. Extreme compatibility with the current entrenched language so you can incrementally migrate. C++ from C. CoffeeScript and TypeScript from JavaScript. Kotlin from Java. 2. A killer app (well, framework). Rails for Ruby. WinForms for C#. Applets and J2EE for Java (later Android). 3. A new platform where you must use the language to t…

I listed two clear counter examples to claim #2, C++ and Javascript. I'm even tempted to put C in that list, because C was already popular before Linux. What was Python's killer app? What is Rust's killer app? Go's? Kotlin's? Java is a counter example to your claim #3 since it not only does it run on all OS'es but you can also develop it on all OS'es.

C++ and Javascript are definitely not counter examples as I commented.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#226

Earlier quoted context omitted.

> What was Python's killer app? Not a killer app, but the fact you have so many ML frameworks > What is Rust's killer app? That's clearly Servo. > Go? It was docker which really made Go take off, it was their first big platform. > Kotlin's? Android compatibility, before that it was a niche language not being picked up much.

Python already won before ML was a thing.

It was called Zope.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#227

Earlier quoted context omitted.

I prefer something that you can build yourself so expo wasn't an option for me. Plus, I think most of the platforms one day (might be soon) will ban these services as they can deliver code to the app after it has been approved. With Flutter it's super easy, they have a CLI that creates an initial boilerplate for your code that you can compile and deploy to your phone in just a single command with hot reload enabled.…

Wait... we were talking about ease of access right? Just re-reading the getting started guide for flutter, you need a set of tools, the flutter SDK, xcode etc. That's not one command. The same goes for React Native, you need node and xcode for building locally just like with flutter. I am talking about the advantage expo offers to try React Native without any tools. Heck you could try it in an iPad only if you'd want…

I didn't find it hard to set up, it's just once CLI that also has "flutter doctor" command that tells you if something is wrong. Since I already had XCode (as I was doing some work on Swift) and Android Studio, I didn't find it even a little bit annoying :)

What really made the difference for me was their CLI to build and run the app + batteries included approach where the router is available out of the box and you don't need to look through some GitHub projects on how to implement routing and authentication in your app. That wasn't the case with RN.

Also, in this setup, all the infrastructure is in your computer, no need for a cloud service like Expo. However, I do agree with you that if you just want to try something simple, it will be easier with it, it's just how much can you trust that service and why would you for something more serious?

Re: Announcing Dart 2 Stable and the Dart Web Platform

#228
post #206

Earlier quoted context omitted.

I'm on the Dart team and I agree with pretty much all of this. Personal opinion time: Lars and Kasper, the original leads and creators of the language came out very confidently with this mission to get Dart natively supported in the browser based on the assumption that the language was so good and the VM would be so fast that users would clamor it. They had the best of intentions — they really did want to make a deli…

Off topic but... are there any plans to adapt Flutter for desktop apps?

I'm the lead dev on just such a project: https://feather-apps.com/

Re: Announcing Dart 2 Stable and the Dart Web Platform

#229
post #129

Earlier quoted context omitted.

A pointer is absolutely a type in rust. let i: u32 = 1; let p_imm: const u32 = &i; Look at the const u32 in the type position. The rust book even refers to const and mut pointers as types.

const and mut are not types, it's modifiers of mutability. On both lines type is u32z

The asterisks in leshow's comment are being lost in the formatting, since HN uses them for italicization. So the last line, for example, is:

    The rust book even refers to *const and *mut pointers as types.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#230
post #179

Earlier quoted context omitted.

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.

While you're there, you may as well indent everything after the "while(true)"

Oops, I killed that during one of the edits.
Post reply on HN