dmah42 / dart-box2d

Box2D for Dart
http://dart-lang.github.io/dart-box2d/
34 stars 5 forks source link

Make better use of constructors #1

Closed dmah42 closed 11 years ago

dmah42 commented 11 years ago

Currently, many objects just have default constructors and then rely on the caller setting fields directly or calling utility methods. Eg, BodyDef, PolygonShape.

Instead, we should have constructors that fully specify fields. This will minimize the code the developer needs to write and help protect from subtle bugs where developers forget to set fields.

dmah42 commented 11 years ago

Now fields are constructed statically, we have less need of this. Individual cases may come up but the two from the initial bug are invalid. Closing.