3 ms·
I hope Dart gets more support, I really want alternatives to TypeScript for developing webapps which aren't super "bulky" (slow startup, buggy and hard to debug
by armchairhacker 3y ago
I hope Dart gets more support, I really want alternatives to TypeScript for developing webapps which aren't super "bulky" (slow startup, buggy and hard to debug) and support mobile apps. Dart seems to be the best at both although I haven't used it much. It also seems reasonable (one of the reasons I don't like TypeScript is because it still has some quirks from JavaScript like `===`, also because the types are occasionally wrong even in strict mode).
- paulddraper 3y ago> webapps which aren't super "bulky" (slow startup, buggy and hard to debug) All good things. Hot take to think Dart is superior in that respect.
- vvern 3y agoAs hot of a take is that macros and meta programming are going to make startup and code bloat better
- andrewflnr 3y agoThat's clearly not what armchairhacker was claiming.
- mardifoufs 3y agoIsn't flutter the anti thesis of that? Making performant JavaScript apps is much much easier than making a performant flutter or especially flutter web app
- themerone 3y agoYou can use dart without flutter.
- mardifoufs 3y agoAbsolutely, but for webapps, is there any other options using dart? For the record, dart is one of my favorite languages. I'm just a bit sad that it is more or less tied to flutter (not by design, just because it's the main usage it gets)
- freedomben 3y agoHow do you feel about Java? How about Ruby? (If you have worked with those). I'm mainly asking so I have a baseline for what your preferences are. Considered Dart in the past but haven't tried yet
- mardifoufs 3y agoI dislike ruby, purely as a matter of personal preference. As a baseline, python is probably as "dynamic" as I can tolerate, and java I just don't have enough experience with sadly enough. I use mostly c++/go/python with some julia and rust (not enough to have tons of experience with it though!). I'd day try dart, it's very easy to pick up. In some odd ways it reminds me of swift!
- freedomben 3y agothank you!
- satvikpendem 3y agoJaspr is one such framework, it is written similarly to Flutter but it instead outputs HTML, CSS and JS.
- mdhb 3y agoThey are a couple of weeks away from launching a major rewrite of Web support. Historically it was clunky and weird. Now it’s able to use the exact same Web APIs that you’re already used to but now in a type safe way and much much better type safety guarantees that Typescript provides. Example code here: https://github.com/dart-lang/web/blob/main/example/example.dart https://github.com/dart-lang/web/blob/main/example/example.d...
- divan 3y agoI have an opposite experience. Making performant JavaScript app require years of learning hacks of web ecosystem. Which is unsurprising, given that web apps build on the foundation layer not suited for performant UI apps. Flutter apps are performant out of the box, because, well, it was designed with this goal in mind.
- lxgr 3y agoNo idea if it's any better on Android, but on iOS I can recognize a Flutter app within seconds, by the frame rate on a new iPhone dropping to something I haven't seen on any mobile device (iOS or Android!) since the Android 2.2 days on extremely underpowered Qualcomm chips.
- bschwindHN 3y agoYep, my typical experience with flutter apps is having way more frame drops, and occasional bugs which lock up the entire UI and require an app restart. Thankfully I think google is moving towards just using the platform UI for most apps, though I can't remember where I read that so take it with a grain of salt.
- cageface 3y agoMost likely they’re not using the new impeller rendering engine. My flutter app is very smooth on iOS and I didn’t have to put in any fancy hacks to make it that way.
- teho 3y agoFlutter apps have god awful performance when there is even a single platform view on the screen. In effect this means that if the app is monetized by ads, have any video, map embed or anything of the sort, it will have sub-30fps and very janky scroll even on iPhone 15 Pro and it really seems that there is no hacks to save you.
- mdhb 3y agoThat hasn’t been true for over a year maybe two at this point.
- deleted 3y ago[deleted]
- zerr 3y agoDart also deserves alternative UI frameworks. With varying combinations of native controls usage and imperative-ness.
- panick21_ 3y agoClojureScript has a pretty good story there but of course not statically typed. There are some good libraries if you want more checking.
- ezst 3y ago> I really want alternatives to TypeScript for developing webapps which aren't super "bulky" I hear you, but what do you expect Dart's contribution as a language/technology to be in this space, effectively? While syntactically comparable, TypeScript is a better typed JavaScript than Dart will probably ever be (in terms of leveraging a type system to enable more complex/maintainable apps and libraries). And since every programming language compiles to JavaScript these days, you've got some compelling options if you really want to depart from JS altogether (with http://www.scala-js.org/ http://www.scala-js.org/ an amazing one, for which I find the mix of Functional + Object Orientation to lend itself very well to the web). In all, I really fail to see a good reason for Dart to exist nowadays (and surviving as "Flutter's best language buddy" isn't a great one).
- pshc 3y ago> TypeScript is a better typed JavaScript than Dart will probably ever be At the same time, thank goodness Dart doesn't have all the warts of Javascript and a standard sane build system. Dart doesn't have to be the best Javascript to be good at what it does, especially now with algebraic data types and pattern matching. I'm hopeful they'll make Wasm production-ready soon to move away from JS transpilation.
- zwarag 3y agoI did a little programming in dart. There are many things to like. And I believe, at the time of writing, that Dart really is great for both java and js devs. Every object that is used has to be an instance of a class, and the event-driven style for reactive programming is pretty much 1:1 to how js does it. So it truly could become the sweet spot for UI development that is appealing to both types of devs. I just wished it would have native tuples.
- markdog12 3y agoIt does have tuples. They're called records in Dart: https://dart.dev/language/records https://dart.dev/language/records Also "destructuring" via patterns: https://dart.dev/language/patterns https://dart.dev/language/patterns