Discussion:
[dart-misc] Dart 2 - Data as Data
kc
2017-05-18 14:14:51 UTC
Permalink
There has been discussion re json, serialization, value objects,
immutability etc. Json is basically lists/records which can only contain
core value objects - used in Flutter for interop.

Also a common pattern is building a tree of value objects, changing part of
the tree and diffing a against the original. Also used in Flutter.

Kotlin has data classes, type safe builders and anko to give a more
expressive and declarative feel.

Dart could use something in this space.

K.
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Bob Nystrom' via Dart Misc
2017-05-18 16:46:08 UTC
Permalink
Post by kc
There has been discussion re json, serialization, value objects,
immutability etc. Json is basically lists/records which can only contain
core value objects - used in Flutter for interop.
Also a common pattern is building a tree of value objects, changing part
of the tree and diffing a against the original. Also used in Flutter.
Kotlin has data classes, type safe builders and anko to give a more
expressive and declarative feel.
Dart could use something in this space.
Yes, I totally agree. I've talked about it with various people on the team
for a while and toyed with a few ideas (taking inspiration from Groovy
builders, Kotlin builders, Flutter, React, JSX, et al.) but so far I
haven't had enough time to really put together a coherent proposal.

As you can imagine, moving the world to strong mode is a lot of work. Most
languages don't change their static type system after they have millions of
lines of code they have to support!

Once that's settled down a little more, we'll have more bandwidth for
features like this, I hope.

Cheers!

– bob
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'David Morgan ☯' via Dart Misc
2017-05-19 12:43:51 UTC
Permalink
Did someone say data classes with builders?

http://github.com/google/built_value.dart

Definitely a good fit for flutter.
Post by kc
There has been discussion re json, serialization, value objects,
immutability etc. Json is basically lists/records which can only contain
core value objects - used in Flutter for interop.
Also a common pattern is building a tree of value objects, changing part
of the tree and diffing a against the original. Also used in Flutter.
Kotlin has data classes, type safe builders and anko to give a more
expressive and declarative feel.
Dart could use something in this space.
K.
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...