Live data from Hacker News

Flutter: UI platform designed for ambient computing

developers.googleblog.com

61–70 of 74 posts

Re: Flutter: UI platform designed for ambient computing

#61
post #28
post #20

What are people's impression of Dart as a language, compared to e.g. Typescript? Reviews so far seems lackluster. Does Dart have anything that sets it apart from JS, like immutable data structures out of the box? How's the support for functional programming, e.g. first order functions, closures, higher order functions like map, filter, reduce, etc? How advanced is the typing system, are we talking Java level or signi…

Full disclosure: Google employee As an engineer that's written a lot of (old-skool) JS, Java, Obj-C, C++, and PHP, it is a real pleasure to develop web frontends with Dart. Immutable Data Structures: Not out-of-the-box but we use the BuiltValue[0]/BuiltCollection[1] libraries extensively internally Functional Programming: Dart's Iterable[2] and Stream[3] classes have all the standard higher-order functions, like map,…

How would you compare Dart to Kotlin, in both typing system and functional programming support?

Re: Flutter: UI platform designed for ambient computing

#62
post #20

What are people's impression of Dart as a language, compared to e.g. Typescript? Reviews so far seems lackluster. Does Dart have anything that sets it apart from JS, like immutable data structures out of the box? How's the support for functional programming, e.g. first order functions, closures, higher order functions like map, filter, reduce, etc? How advanced is the typing system, are we talking Java level or signi…

I've used both recently, deciding between them. Dart is better. * Typescript is much more popular, and integrates with other Javascript things better. There are way more libraries available for Typescript. * Typescript has proper support for non-null types, whereas in Dart everything is nullable (though they are fixing it, as announced here). * Typescript has pretty nice support for anonymous sum types (i.e. `number…

> Typescript has `interface` and `class` which is needlessly confusing

Java and C# have had a distinction between `interface` and `class` for decades. It shouldn't be that confusing? One describes a shape or a contract of an object and the other an implementation of a kind of object (which in turn might support multiple interface shapes/contracts). It's not something unusual to OOP languages with type systems. Perhaps the only thing to complain about Typescript interfaces is that they are far more on the shape side of things than the contract side of things, and it is tough to rely on them if you want more of the contract semantics (because the language can't enforce that contract).

> It's way too easy to give up on typing in Typescript. It has a setting "no implicit `any`" but it doesn't seem to be comprehensive

Typescript gets as comprehensive as you want it to be. It's set of checks is an onion design to allow for various control needs, especially because projects may need to opt-in to only some of the checks in order to ease migration. If you want all the checks the flag to pass isn't `--noImplicitAny` it is `--strict` (or in tsconfig.json, "strict": true). I recommend that for all greenfield projects and most brownfield projects if they don't mind fixing lots of compile errors (for the betterment of their project).

> Because types are added to Javascript libraries (via DefinitelyTyped), there's nothing that really checks that they are correct

Not all type information is from DefinitelyTyped anymore, and in many ways DT is smaller than it was at its peak. More and more libraries on npm themselves are written in Typescript and provide their own type information fresh out of the Typescript compiler itself. Even libraries that aren't written in Typescript are taking maintenance ownership of their Typescript types themselves and sometimes the JS authors are right there critiquing their own types.

There will always be a mismatch between untyped JS and what Typescript types represent of that world, but it is better than it used to be, and better all the time.

Re: Flutter: UI platform designed for ambient computing

#63
post #30
post #20

What are people's impression of Dart as a language, compared to e.g. Typescript? Reviews so far seems lackluster. Does Dart have anything that sets it apart from JS, like immutable data structures out of the box? How's the support for functional programming, e.g. first order functions, closures, higher order functions like map, filter, reduce, etc? How advanced is the typing system, are we talking Java level or signi…

Any language/toolchain that compiles to both native Android and native iOS is going to be a blessing, regardless of the features at the language-level.

C can do that and few would argue it is a blessing. ;)

(Also, Xamarin and C# wave hello from the other room.)

Re: Flutter: UI platform designed for ambient computing

#64

Wow, talk about burying the lede. I'm not sure how I feel about Google's so-called "ambient computing" idea that they were all about at this year's Google I/O, but Flutter being championed for desktop and web are huge! Does this mean the end of Electron, finally? They say it runs on macOS, I hope they get to Windows and Linux soon. I built a little Android/iOS app in Flutter and it was a real delight. I didn't especi…

I don't know how well they're supporting desktop and web UI idioms yet, but it looks like you can try out Flutter on the web using DartPad: https://medium.com/dartlang/a-brand-new-dartpad-dev-with-flu...

Flutter already offically supports web and is a compilable target by default. You don't need dartpad. It is still on beta.

https://flutter.dev/web

Re: Flutter: UI platform designed for ambient computing

#65
post #13

Earlier quoted context omitted.

I’m a professional plugin developer. I make plugins for Cordova, React Native and Flutter. Flutter is my favorite. You should do a hello world at least.

Is building plugins faster/easier than building apps (using Flutter)? Looking to learn flutter so wondering if I should build a plugin or app when going beyond hello world.

Build an app. There are many things in the plugin api that you don’t interact with in the app. The plugin api is the bridge between the front-end and native iOS / Android apis.

Re: Flutter: UI platform designed for ambient computing

#66
post #9

Earlier quoted context omitted.

I’m a professional plugin developer. I make plugins for Cordova, React Native and Flutter. Flutter is my favorite. You should do a hello world at least.

Where do you sell Flutter plugins? How do you come up with ideas?

Over 5 years ago, I created a background-geolocation plugin for Cordova. I later ported it to React Native and now flutter. It’s not every plugin that could be monetized. Geolocation, especially in the terminated state, is a special case.

https://github.com/transistorsoft/flutter_background_geoloca...

Background geolocation for iOS / Android is all I do.

Re: Flutter: UI platform designed for ambient computing

#67
post #53

Ugh, another Flutter media campaign. Why would you ever learn a Google language and use a Google framework, especially a framework that has to emulate all other platform UIs. How long until it's shut down?

We don't really "emulate" the UI on Android, FWIW. We have one of several implementations of Material design, another of which is designed for the Android View hierarchy, another is designed for JS on the Web, and so on. In some respects Flutter's implementation is actually ahead of the others, so if anything, they're "emulating" us. :-)

You're not using native UI. You're emulating the UI by re-painting it. No matter what you call it, it's an emulation of the native UI, which means it can become out of sync.

Currently React Native can bridge with all Windows platforms, MacOS, Android, iOS. Web can be targeted via React Native Web fork or a wrapper like ReactXP.

That is a more attractive option than an emulated UI. It's similar to wxWidgets vs QT. I much prefer bridging to emulation.

Re: Flutter: UI platform designed for ambient computing

#68

Ugh, another Flutter media campaign. Why would you ever learn a Google language and use a Google framework, especially a framework that has to emulate all other platform UIs. How long until it's shut down?

Flutter has been introduced in 2015 while Dart has been around since 2011. Since Google seems to have bold plans for their Fuchsia operating system to replace Linux for mobile, laptop and smart home devices and is using the framework for actual devices they already ship to customers, I'd say it's safe to assume that Flutter and Dart won't be abandoned anytime soon.

It's not safe to assume if it's not part of their core business, especially if it's what you build your software from.

Bold plans are usually where Google fails.

Re: Flutter: UI platform designed for ambient computing

#69
post #20

What are people's impression of Dart as a language, compared to e.g. Typescript? Reviews so far seems lackluster. Does Dart have anything that sets it apart from JS, like immutable data structures out of the box? How's the support for functional programming, e.g. first order functions, closures, higher order functions like map, filter, reduce, etc? How advanced is the typing system, are we talking Java level or signi…

I've used both recently, deciding between them. Dart is better. * Typescript is much more popular, and integrates with other Javascript things better. There are way more libraries available for Typescript. * Typescript has proper support for non-null types, whereas in Dart everything is nullable (though they are fixing it, as announced here). * Typescript has pretty nice support for anonymous sum types (i.e. `number…

> You can do still stuff like just omitting the return type of functions and then they instantly lose all type information.

That's not the case: http://www.typescriptlang.org/play/#code/GYVwdgxgLglg9mABFAp...

Post reply on HN