mdhb 9 months ago

There is so much cool stuff at various stages of landing in the Dart pipeline at the moment. A few things that come to mind include:

1. Dart now supports the native Web platform APIs and offers a really compelling alternative to TypeScript now thanks to their their latest generation of JS interop. Example for how the code looks here: https://github.com/kevmoo/kevmoo.com/blob/main/web/main.dart

2. Compile to WASM now on the web also with future work to also align itself with the emerging WASI standards both as a compile target and the ability to embed WASI runtimes into Dart programs (technically already possible through their C interop)

3. Lots of great work on cross language interop with C, C++, Swift, Rust, Go, JavaScript, Objective C, Kotlin and Java here https://github.com/dart-lang/native

4. Upcoming Macros feature which gives fully static type safe automatic and fully debugable code generation.

5. Potentially looking at bringing Shared Memory Multithreading to the language https://github.com/dart-lang/language/blob/2662d252b7fa93175...

6. Also some early work on a bytecode compiler it seems but I’ve not seen any kind of announcement about it here https://github.com/dart-lang/sdk/tree/main/pkg/dart2bytecode

7. This REPL

It’s really a good time to be a part of the community. It’s a very bright looking future for it.

  • pjmlp 9 months ago

    Dart's only reason it is still among us is Flutter, if Google ever gets fed up with Flutter, it will fizzle out.

    Meanwhile other programming language ecosystems have plenty of domains that keep them relevant no matter what.

    • mdhb 9 months ago

      I’ve seen you specifically make this exact same argument in almost every single thread that’s ever about Dart of Flutter for I think at least two years now. It’s a really weird fixation you seem to have.

      It’s never come true, you’re talking nonsense just like every other time people try to politely explain it to you.

      • frou_dh 9 months ago

        He posts a boilerplate comment slightly rephrased hundreds of times for several subjects, not just Dart. e.g. see any time Proton games on Linux comes up.

      • pjmlp 9 months ago

        And yet you felt attacked to waste time replying, interesting....

        • mdhb 9 months ago

          If there’s a point in here I can’t find it.

          I don’t “feel attacked” more frustrated that you’re here yet again to make the same crappy points knowing full well you have zero interest in having a real conversation or changing your mind.

          It’s more akin to dealing with the drunk uncle at Christmas who tries to trap you into the same argumentative conversations that he did the past 3 years.

          • 0rzech 9 months ago

            IMHO, some people just really want Dart and Flutter to fail, so they post the same tired doom prophecy in hope it will become self-fulfilling.

            What is also annoying is that they come to normal Dart/Flutter related threads just to spoil them.

            Meanwhile, the ecosystem grows, more and more people and companies choose Dart and Flutter and have fun creating software with this excellent toolchain.

            The dogs bark, but the caravan goes on, as they say.

          • pjmlp 9 months ago

            [flagged]

    • itohihiyt 9 months ago

      I hear this a lot. I don't really see Google getting fed up with flutter, due to what they have invested in it, but for the sake of argument let's say that did happen. Google abandons flutter. What happens next? Will it fizzle out?

      To take your point about the domains, flutter's, and by association dart's, domain is cross platform development from one codebase. As far as I can tell nothing else comes close just now, that domain makes flutter relevant no matter what. Surely as opensources projects, both survive?

      • pjmlp 9 months ago

        Open source only helps so much, depending on how many skilled developers are willing to take it forward.

        How many programming languages and frameworks are out there as open source, that in reality are only limping along?

        • itohihiyt 9 months ago

          True enough, but I think flutter/dart have enough traction beyond Google that they'd survive. I like dart as a general purpose language too.

  • BrutalCoding 9 months ago

    I wasn't aware of that bytecode compiler, even though I work with Flutter/Dart on a daily basis. How did you find out?

    Nonetheless, that’s some low level stuff that I have little experience with haha.

    • mdhb 9 months ago

      I spend some time each week just browsing the various repos under the Dart account to see what’s going on in the ecosystem and that turned up recently but as I said there no kind of announcement so I would take them very literally when they say it’s an experiment.

  • skybrian 9 months ago

    Where is JS Interop used in the first example? (It's a bit hard to tell with the wildcard imports how much of that is actually coming from web.dart.)

    • mdhb 9 months ago

      Web.dart is basically designed to give you the equivalent of any of the browser based APIs you would find on MDN essentially unchanged so things like document.querySelectorAll and things like that would just work as though you were using JavaScript (and you technically are in the background) but without otherwise needing to ever leave Dart.

      • skybrian 9 months ago

        Well, sure, but web.dart is one of the original packages that came with Dart. That part isn't new.

        • mhoad 9 months ago

          That’s not actually correct I don’t know where you got that from. This is from this year and was built on top of a wider rewrite of their JS interop using new language features to make it essentially a zero cost abstraction.

          Dart has had browser support and DOM APIs before but never had the same APIs you have in the web platform before.

          • skybrian 9 months ago

            I think I had it confused with dart:html, which looks almost the same. I don't see a big difference in the example code.

  • meiraleal 9 months ago

    > It’s a very bright looking future for it.

    Err... At Google? After laying off the core maintainers? Not bright at all.

    • mdhb 9 months ago

      That literally never happened.

      • meiraleal 9 months ago
        • skybrian 9 months ago

          Yes, there were layoffs. But "core maintainers" is not a term they use, and kind of fuzzy since people come and go; some early team members left well before then. People didn't all leave (or get laid off) at the same time, and they never laid off the entire team as far as I know.

          More:

          https://www.reddit.com/r/FlutterDev/comments/1cduhra/comment...

          • dartos 9 months ago

            Sure, whatever.

            The one major company backing a project lays off a number of the team working on the project.

            That is not exactly the signal of a bright future.

            • mhoad 9 months ago

              It would be cool if you could apply even the most basic reading comprehension here where it says there was zero change in team size and stop spreading nonsense.

              • dartos 9 months ago

                Ok.

                Here’s the top comment from the Reddit post that was linked

                > Hey folks! Kevin, product manager on Flutter and Dart here.

                > The layoffs were decided AT LEAST a couple of layers above our team and affected a LOT of teams. (I think I can say that). Lots of good folks got bad news and lots of great projects lost people. Flutter and Dart were not affected any more or less that others. It was a tough day...tough week.

                Can you comprehend that?

        • Alifatisk 9 months ago

          Did you see the comment below the post?

          > Hey folks! Kevin, product manager on Flutter and Dart here.

          > The layoffs were decided AT LEAST a couple of layers above our team [...]

          > Flutter and Dart were not affected any more or less that others.

          • meiraleal 9 months ago

            That's exactly the post that confirms the layoffs and that Google moved some clueless extras to fill the gap. Which means the core maintainers were laid off. If one think that removing the main team of a project won't affect its speed and quality, one is absolutely delusional.

            • mdhb 9 months ago

              JFC how many times do you need to be told that what you’re claiming didn’t happen. You’ve been caught multiple times just straight up making up entire story lines that exist only in your head rather than just admitting that you had some bad information.

              It’s genuinely one of the weirdest things I’ve seen on here in some time.

              • meiraleal 9 months ago

                You seem to have issues with anger management and frustration related to people disliking Google because of how they often kill products they use. Screaming "It didn't happen" don't change thevfact that a big part of the team was laid off. Adding "headcount" doesn't change that.

                Also, if you can't talk without offending and going out of your mind, you can just respect this forum guidelines and say nothing.

                • Alifatisk 9 months ago

                  > a big part of the team was laid off

                  This didn’t happen the Flutter / Dart team specifically. You are portraying this as an issue with Flutter only.

aidos 9 months ago

Even though I don’t use Dart myself I very much approve of this initiative.

I live in my Python REPL (ipython) and I couldn’t live without my hot reloading without losing state. Allows for hacking about a bit directly in the REPL. Once something starts to take shape you can push it into a file, import it into your REPL then hack about with it in a text editor.

The hot reloading is great when you have a load of state in classes and you can change code in the editor and have that immediately updated on your existing objects in the REPL.

0x_rs 9 months ago

Dart is really nice to write in, with far less mental overhead than some of its would-be competitors that couldn't possess the same wisdom and foresight at the time of their creation, so an interactive shell for it is pretty cool. In general I think it's slowly trying to carve its place in the world other than Flutter's language (for which many great packages have been made), but it doesn't have any other forefront project or library, and probably still carries a bit of prejudice from the Dartium mayhem and being a language looking for some purpose that could be orphaned by a blind-sighted Google at any time, the Ads story about it still comes up often. I'd like to see it around more.

  • vineyardmike 9 months ago

    I somewhat disagree.

    Dart is a decent language for Flutter, but I’m not sure why you’d want to use it off of the flutter path. Maybe for CLI or other client-side tools? Either way, if you’re not re-using a dart package or using flutter, you absolutely should not pick it as your tool of choice.

    The language seems nice syntactically, but I find it really frustrating in practice. It’s good enough for the “happy path” that was envisioned - basic UI hierarchies. It’s clear some team designed the language by first writing examples of what they wanted it to look like when making a UI. I think Swift UI caused similar complexities on Swift. You can confirm that even the contributors think this from reading controversial PRs in GitHub.

    The nice thing about flutter, and Dart, is that it’s starting to take a life on outside Google. Google should hand off ownership to a foundation or other organization - especially now that their newest thing is Kotlin Multiplatform. I hear more and more companies writing flutter backends for their UI work, so hopefully it could survive alternative stewardship. I believe some TVs and car navigation systems now use flutter, plus all the google stuff.

    • andriesm 9 months ago

      Dart is my favourite language, it is the flutter framework I'm not so fond of. People literally designed better GUI frameworks than flutter 20 years ago. They did all sorts of weird things, probably for "performance" reasons, that forces the user to do things that kinda undo many of those "gains". Language wise, I love the fact that it comes with NULL safety out of the box, the number one feature I miss in GO-lang is NULL safety. NULL safety has very low cost to syntax or compile efficiency, and literally takes away half your program crash possibilities.

      • Zen1th 9 months ago

        > People literally designed better GUI frameworks than flutter 20 years ago.

        Which ones? Flutter is quite good, especially compared to things like Java Swing or GTK.

        • pjmlp 9 months ago

          Delphi VCL, Windows Forms, WPF, Cocoa,

          • andriesm 9 months ago

            exactly. Borland era OOP gui code was amazingly well thought out. The flaws in the flutter framework are soooo many, a lot of half baked things are made standard. Try to get 2-way scrollbars working decently (try to nest them, or go watch the video tutorials that supposedly explain how to do this - it was an absolute horror show). There are so many hassle factor things that one googles or searches the github for, find tons of other smart people beg for it with examples and use cases and just watch the team say they won't implement for some or other reason. But even the simplest thing, that when you create a component (say with mutable state) - you don't create one class to get one widget defined, noooo you have to create two, one stateful and one stateless. All of these little weird decisions that were made for bs reasons eventually add up to a ton of incidental complexity. Oh we made part immutable for "performance" reason, but the real reason is that people don't understand when to avoid functional style programming idioms. All the weird ways the layout system can bite you, the way they designed constraints being passed down and sizes passed back up - boy are they forcing you to do a lot of thinking about incidental complexity, and the different containers and how thy interact in ways you would not expect by default. The fact that you cannot on a per container basis disable overflow displays in dev (many people have asked for this). That silly debug ribbon your app gets until you disable it LOL who thought that was a good default. In the end though one can make it do a lot, and it is reasonably performant. But the pitfalls are many, and basic stuff that it doesn't solve well for you.

    • surajrmal 9 months ago

      Golang doesn't have an alternative ownership structure. Kotlin doesn't have an alternative ownership structure. Why is it important for dart and flutter? This feels like moving goal posts.

      If there were major other entities seeking to participate in its development and advancement I could see a reason to change things, but that doesn't seem to be the case.

      • vineyardmike 9 months ago

        First, I was defending Dart/Flutters ownership structure - Google's support seems weak, but many other companies are taking a stronger interest in the ecosystem, so that's encouraging to it's long-term future. Meanwhile, Google seems to be turning to non-flutter tools in their approach to cross-platform development, so it is questionable how much support Google will give it long-term, as their needs change.

        I think that Google should explicitly encourage and support the ecosystem by moving key tooling to a third party foundation, even if staffed by their employees - eg. the pub.dev package manager could be maintained independently and get a team dedicated to it. Google would be then free to drop support, or change direction, without dragging this great ecosystem down to stagnate.

        Golang/Kotlin are seeing strong, and continued, support amongst their owners, and their support isn't questioned. That said, many people have questioned the direction of Golang because the only maintainers are Google employees, and they don't listen to much outside opinions for direction.

    • vips7L 9 months ago

      Kotlin is a Jetbrains product, not a Google one.

      • sigzero 9 months ago

        I don't think the OP was making that point just that Google is now USING Kotlin.

synergy20 9 months ago

dart's syntax is very easy to pick up, sadly it's defined as a 'client-side language', instead of a general purpose one, otherwise I would invest more time into it.

while flutter is cross platform I think for the web, WASM is its focus, which I dislike, not sure what JS interop mentioned in the comment here really does. can Dart be compiled to readable JS?

  • mhoad 9 months ago

    They dropped that “client side” framing a while back thankfully. It’s considered a general purpose language at this point.

    • isoos 9 months ago

      One of the postgresql client packages (posgres) is roughly 8 years old. That's how "client side" it ever was...

nmfisher 9 months ago

Is there any way this can be used to evaluate code at runtime (e.g in a Flutter app)?

  • vineyardmike 9 months ago

    If you want to evaluate code at runtime, check out “flutter remote widgets”.

    This is the “built in” way to do runtime evaluation. It lets you dynamically load things. Google used this in some LLM demo where an AI created a UI in response to a user query.

daft_pink 9 months ago

I love repl and I hope more languages implement it.

meiraleal 9 months ago

[flagged]

  • IshKebab 9 months ago

    No the Flutter team wasn't laid off.

    • meiraleal 9 months ago
      • mdhb 9 months ago

        I just want to make it clear that for all the bullshit on this topic as far as I’m aware it was a SINGLE PERSON and this weird story developed around it but the story you seem to have in your heard is completely wrong.

        • meiraleal 9 months ago

          Not sure why you are triggered by this (do you work on Flutter?) but this "weird" story is backed by https://killedbygoogle.com/ - we are not talking about a company without a track record here. Peace out.

          • mdhb 9 months ago

            I just can not for the life of me understand the mentality of someone who themselves knows full well this isn’t a topic they are an expert in will jump into the middle of a conversation about it, spout nonsense and when they are corrected that what they are saying isn’t actually true chooses to double down on it rather than just accepting they had some bad information.

            It’s just incredibly weird behaviour and yet, almost every time I’ve seen a conversation about Dart or Flutter on here for the past year or two I keep running into the EXACT SAME situation and made up stories like what you did today.

            • meiraleal 9 months ago

              [flagged]

              • mdhb 9 months ago

                You’ve just made up an entire story in your head further proving my point here. I don’t work for Google or depend on them for any income. I’m just a person who’s frustrated listening to moronic arguments.

                Why you are incapable of admitting when you’re wrong however is really something worth reflecting on.

                You’ve made up not one but two stories now to justify some idea you have in your head about the situation. That’s extremely weird behaviour.

                • meiraleal 9 months ago

                  > Hey folks! Kevin, product manager on Flutter and Dart here.

                  > The layoffs were decided AT LEAST a couple of layers above our team and affected a LOT of teams. (I think I can say that). Lots of good folks got bad news and lots of great projects lost people. Flutter and Dart were not affected any more or less that others. It was a tough day...tough week.

                  That's the reality of things. Whatever you came up in your mind to think that laying off "lots of good folks" won't affect priority, speed and quality of a project, that's up to you. You should deal with your frustration in better ways, maybe with a specialist.

          • IshKebab 9 months ago

            I can't find Dart or Flutter on that site.

            Even if I could they tend to exaggerate to make the list more impressive. E.g. they include stuff that has just been rebranded or changed form a little (Chromecast) or even things that were obviously one-offs (Google Cardboard??).

          • Qiu_Zhanxuan 9 months ago

            You're just spewing misinformation at this point, GP just debunked everything you said by a comment from the flutter team. What's your goal here ?