Mike Lewis
2015-07-27 16:44:23 UTC
In building my API, I've found it difficult to come up with a consistently
nice way to organize the members within my classes. The Dart Style Guide
<https://www.dartlang.org/articles/style-guide/#members> only touches on
constructors, and simply recommends *using* things like setters and
getters. But is there a recommendation or best practice for how to lay out
a class that helps for readability and navigation? For example, should a
constructor always be at the top? Would it make more sense to put all
static members before or after instance members? Private before public? etc.
I could see this being difficult to standardize and may just depend on
subjective preference or the target application of an API, so I'd also be
interested in a recommendation for an existing library package (one where
the classes are very nicely laid out) to use as a model.
nice way to organize the members within my classes. The Dart Style Guide
<https://www.dartlang.org/articles/style-guide/#members> only touches on
constructors, and simply recommends *using* things like setters and
getters. But is there a recommendation or best practice for how to lay out
a class that helps for readability and navigation? For example, should a
constructor always be at the top? Would it make more sense to put all
static members before or after instance members? Private before public? etc.
I could see this being difficult to standardize and may just depend on
subjective preference or the target application of an API, so I'd also be
interested in a recommendation for an existing library package (one where
the classes are very nicely laid out) to use as a model.
--
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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.