News for hackers. Stuff that matters.
Re:Three Mistakes from Dart/Flutter's Weak PRNG by mightyham on Friday December 13, 2024 @10:54AM (#42409669)
Dart feels extremely out of place in the modern programming language landscape. Besides the fact that it has a really good UI library, the language itself does not really have any real advantages over (your choice of JVM language) for server/desktop software. It's clear just from using the language that it was designed as a more "serious" Javascript replacement, but (relatively) recent developments like the ubiquity of Typescript and a variety of good JS server runtimes, have basically put this pipedream in the grave. Now Dart/Flutter is a weird google side project that is competing with another google offering (Kotlin/Jetpack Compose) for market share in a space that's increasingly seeing adoption of web based tools like React Native/Expo, Ionic and Tauri.

That was rambly, but the relevance to this post is that the existence basic PRNG flaws in Dart's standard library makes me even more weary of ever choosing Dart for a production application.

Re:Three Mistakes from Dart/Flutter's Weak PRNG by throwaway032023 on Friday December 13, 2024 @11:49AM (#42410137)
> It's clear just from using the language that it was designed as a more "serious" Javascript replacement

What is your usage of Dart?

JavaScript is a target platform for Dart. The Dart interop story is the point. It’s a cohesive glue language. First class interop with JavaScript, Java/Kotlin, C++ and Swift/ObjC. Community interop supports go and rust.

Maybe I am confused. We are comparing Dart to what again? Yes, Flutter is what Dart is known for and it’s, imho, important for their to be primary customer to drive evolution of language.

I don’t do JavaScript development but anytime I bump into it it’s a cluster with regards to tooling (maybe this has changed in the past 3 years). Dart comes ootb with tooling that is a cohesive experience. The technology is impressive and I think it’s filling a niche.

Dart reminds me of Python 20 years ago. Python shipped with IDLE, glued platform (win32com), corba, java, etc features together.

Dart is doing similar stuff but first class interop from the supplier (Google/dart team) for the platforms (js/wasm, mobile, desktop). It is pretty damn amazing and ambitious (maybe too ambitious?). And pub/package system is nice - dart is statically compiled and Google is one of the main innovators in software supply chain security - I think there is real possibility of it being orders of magnitude more secure than python/javascript. (This is not the case currently)

I guess I see it as a “I can stay in this world and do most of what I need”. Are there sharp edges? Yes. But the tooling and the community can resolve this fairly quickly. I don’t need to jump between abuncha languages with tooling disparaties.

Re:Three Mistakes from Dart/Flutter's Weak PRNG by mightyham on Friday December 13, 2024 @03:39PM (#42412153)
For clarity, I'll admit that I do not have industry experience with Dart. I have built a medium sized mobile application with it, and have spent a pretty good deal of time digging into Flutter's architecture and reading it's source code.

If you are debating the statement I made: "It's clear just from using the language that it was designed as a more 'serious' Javascript replacement", it's simply a fact that the Dart language was originally designed to be a Javascript alternative in Chrome, and the language clearly takes a lot of inspiration for Java and C++ which are widely used at Google.

> Maybe I am confused. We are comparing Dart to what again?

I'm comparing it to other garbage collected languages. I don't think Dart really even has a backend story, but in that case I would compare it to Go, any JVM language, and Javascript/Typescript. For frontend applications I'm comparing it to Javascript/Typescript.

Maybe you could tell me what about my comment is confusing, but I'll rephase it and add some more context. From everything I've read, the Dart team at Google is small an insular. Google has a nasty reputation of cutting niche products and has been doing lots of layoffs in recent years. Even though Dart has an good UI library, there are numerous attractive alternatives that are more familiar and popular. Putting all that information together, I would not choose to use Dart for basically any new project.

Re:Three Mistakes from Dart/Flutter's Weak PRNG by Apocryphon on Saturday December 14, 2024 @11:31AM (#42418015)
> numerous attractive alternatives that are more familiar and popular

There’s React Native. Ionic is stuck in the same limbo that PWA are in and Tauri is obscure. Qt is hardly used in mobile apps and Microsoft’s successors for Xamarin deprecate themselves every few years. What else is there, NativeScript? Kivy? Delphi?

Re:Three Mistakes from Dart/Flutter's Weak PRNG by mightyham on Saturday December 14, 2024 @01:29PM (#42418616)
Dart is really not much different from a PWA/Ionic though: the language requires bindings to use native APIs; it's runtime is not native to any platform (where as most platforms do have native web runtimes); and it's rendering system doesn't support native widgets (in fact, it currently uses Skia which is the same rendering library as Chrome).
Re:Three Mistakes from Dart/Flutter's Weak PRNG by Apocryphon on Sunday December 15, 2024 @09:36AM (#42423603)
And yet, it has much higher adoption. I think it might be because PWA have long been second-class citizens on mobile, even with some recent OS updates.
Re:Three Mistakes from Dart/Flutter's Weak PRNG by BoorishBears on Friday December 13, 2024 @11:37AM (#42410045)
The title had me quietly think to myself "Dart was the mistake".

So many stack/enviornments are leveling up their languages: ObjC => Swift, Java => Kotlin, Erlang => Elixr, C++ => Rust, Javascript => Typescript

Dart feels like one of the befores, not the afters.

Re:Three Mistakes from Dart/Flutter's Weak PRNG by throwaway032023 on Friday December 13, 2024 @11:52AM (#42410162)
Feels is the key to that statement. :-) It’s these “feels” that got USA to its 2024 election outcome.
Re:Three Mistakes from Dart/Flutter's Weak PRNG by BoorishBears on Saturday December 14, 2024 @01:30PM (#42418620)
Are you ok?