Live data from Hacker News

Clojure Dart

github.com

21–30 of 43 posts

Re: Clojure Dart

#21

Nice work! I'm actually pretty excited to give this a shot. I like Flutter and Clojure. But writing Dart isn't the most fun thing I can imagine doing. Fun is something I find important in personal projects, but not so much my day to day work. I don't care about the language that pays the bills, the type of projects is way more important there.

>But writing Dart isn't the most fun thing I can imagine doing I really really do not understand this. Dart 2 is one of the most beautiful languages out there. Dart is a composition of the best parts of python (or maybe ruby?), javascript, c# and java.

Have you actually used Dart on a non-trivial project ? It's boilerplate hell and spaghetti code generator nightmare that works around the nonexistent reflection system and closed object model.

If you look at libraries like built_value and built_collection and think that's beautiful when comparing it with Clojure than I'm sorry but you just don't know what you're talking about. Even the authors of these libraries (AFAIK from the Dart team) acknowledge the design decisions they had to make are a result of language limitations.

IMO it's literally the worst of Java and JavaScript - off the top of my head I've had several cases where I would get runtime exceptions about a type mismatch in a ternary expression that wasn't caught by type-checker, JS style. Type system was very weak in general. And the ammount of boilerplate and code generators I had to work with brought me back to Java 6 days.

TypeScript is miles ahead of Dart in terms of expressiveness and productivity, even when built on a pile of shit that is JS.

Flutter is an interesting project (the asynchronous IPC rendering architecture has some major drawbacks when interoperating with native components), but Dart is hands down the reason I wouldn't touch it in the future unless the team spends some serious effort on language ergonomics.

A decent implementation of Clojure + Flutter would change that equation for me considerably and Clojure would be a really good fit for Flutter.

Re: Clojure Dart

#22
post #18

Earlier quoted context omitted.

I wonder why they didn’t simply opt to use ClojureScript with React Native. That seems like a much more pragmatic move than creating and supporting your own compiler to Dart just so you can use Flutter.

React Native apps are slow if not engineered well. Naïve implementations of RN apps tend to scale really badly. FB is fixing this with their new architecture (Fabric Render and TurboModule) but the rollout and adoption is even slower than their apps. Flutter on the other hand performs reasonably well (generally speaking) even if you outsource the engineering to the lowest bidder in Eastern Europe or South Asia. Flutt…

> Flutter on the other hand performs reasonably well (generally speaking) even if you outsource the engineering to the lowest bidder in Eastern Europe or South Asia.

Discussion on Flutter Performance at r/cpp is enlightening: https://www.reddit.com/r/cpp/comments/u0ut2a/comment/i4b0lqt...

> "Unfortunately, Flutter is currently a pile of hot garbage from the performance PoV.

> Their own Hello World example, which has one animated button on screen, which updates the label when you press it (see their screenshot) in Release manages to stutter on Moto G7 Power, a phone from 2019. Which smoothly runs quite demanding 3D games.

> According to Android Studio's profiler, about 20% of the frames do not fit into the time slot when the button is pressed. I don't know how did they manage to achieve this with such a trivial example on a Snapdragon 632, but they did it. So, to run smoothly on not-latest phones, your app should somehow be even simpler than their Hello World example, which seems hard to do.

Re: Clojure Dart

#24
post #18

Earlier quoted context omitted.

I wonder why they didn’t simply opt to use ClojureScript with React Native. That seems like a much more pragmatic move than creating and supporting your own compiler to Dart just so you can use Flutter.

React Native apps are slow if not engineered well. Naïve implementations of RN apps tend to scale really badly. FB is fixing this with their new architecture (Fabric Render and TurboModule) but the rollout and adoption is even slower than their apps. Flutter on the other hand performs reasonably well (generally speaking) even if you outsource the engineering to the lowest bidder in Eastern Europe or South Asia. Flutt…

I don’t understand all the marketing hype about Flutter’s good performance. I can often tell an app is written with Flutter just based on how slow it feels on my iPhone 13 Pro. I think the 120 Hz screen doesn’t help, but there are obvious stutters in even simple apps.

If a current generation flagship phone struggles, then I just can’t imagine how a more affordable phone that is a couple years old would fare.

See Google’s own Google Pay app as an example. Its performance is unforgivably bad. Perhaps it runs better on Android, but on iOS it feels bad.

Re: Clojure Dart

#26

Earlier quoted context omitted.

>But writing Dart isn't the most fun thing I can imagine doing I really really do not understand this. Dart 2 is one of the most beautiful languages out there. Dart is a composition of the best parts of python (or maybe ruby?), javascript, c# and java.

Have you actually used Dart on a non-trivial project ? It's boilerplate hell and spaghetti code generator nightmare that works around the nonexistent reflection system and closed object model. If you look at libraries like built_value and built_collection and think that's beautiful when comparing it with Clojure than I'm sorry but you just don't know what you're talking about. Even the authors of these libraries (AFA…

what dart should add a way to automatically understand json and turn it into an object. that would be nice for those of us who don't like creating models

Re: Clojure Dart

#27
Super excited to see this! Clojure is an absolutely delightful language to use professionally (not to mention insanely productive). I've heard great things about Flutter and Dart also from people I trust and admire.

Re: Clojure Dart

#28

Earlier quoted context omitted.

>But writing Dart isn't the most fun thing I can imagine doing I really really do not understand this. Dart 2 is one of the most beautiful languages out there. Dart is a composition of the best parts of python (or maybe ruby?), javascript, c# and java.

Have you actually used Dart on a non-trivial project ? It's boilerplate hell and spaghetti code generator nightmare that works around the nonexistent reflection system and closed object model. If you look at libraries like built_value and built_collection and think that's beautiful when comparing it with Clojure than I'm sorry but you just don't know what you're talking about. Even the authors of these libraries (AFA…

Not only have used in non trivial situations but 1000% would use again and now consider it my default go to language of choice.

As mentioned elsewhere in this thread it clearly DOES do well at exceptional scale given that the majority of Google’s revenue is all run through Dart. It’s also a really critical part of the new operating system they are currently spending stupid amounts of money building.

It’s funny that you mention TypeScript because for me every time I touch it I wish it was Dart for a million different reasons.

Not sure when the last time you used Dart but some of the things you mentioned gave me the impression it was either a while ago or you were doing some very specific stuff with it. I absolutely do not associate Dart with large amounts of boilerplate and especially not compared to a language like Java.

The package you mentioned built_value was just a clone of auto value in Java and similar to how the language made auto value no longer needed the same is happening in Dart this year as they are bringing in the concept of static metaprogramming to remove the limitations that lead to its initial existence.

I actually think of it as having the best language ergonomics of any C style language I’ve ever seen.

Guess we value different things…

Re: Clojure Dart

#29

This is very interesting to see, lots of fun use cases with Clojure + Flutter. > no REPL yet Seems the most vital part is missing so far, but impressive enough with this first version released. Something I personally I do when hacking on my own lisps (happens too often maybe), is implementing support for the nrepl protocol so I can use neovim + conjure with it as soon as possible, to help further the development of c…

ClojureDart co-author here. It happens in Dart too. Some changes are not compatible with the current application state. It may occur a bit more frequently because of Clojure being less stringent than dart about giving names to everything (which is tedious but definitely helps with hotreloading).

Re: Clojure Dart

#30
post #18

Earlier quoted context omitted.

I wonder why they didn’t simply opt to use ClojureScript with React Native. That seems like a much more pragmatic move than creating and supporting your own compiler to Dart just so you can use Flutter.

React Native apps are slow if not engineered well. Naïve implementations of RN apps tend to scale really badly. FB is fixing this with their new architecture (Fabric Render and TurboModule) but the rollout and adoption is even slower than their apps. Flutter on the other hand performs reasonably well (generally speaking) even if you outsource the engineering to the lowest bidder in Eastern Europe or South Asia. Flutt…

> React Native apps are slow if not engineered well. Naïve implementations of RN apps tend to scale really badly.

I think these statements are true for any application framework

Post reply on HN