Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Issue 10974004: Add documentation to the Object class in the core library. (Closed)

Created:
8 years, 3 months ago by Mads Ager (google)
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add documentation to the Object class in the core library. R=lrn@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=12770

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -3 lines) Patch
M lib/compiler/implementation/lib/core_patch.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/core/object.dart View 1 1 chunk +48 lines, -1 line 0 comments Download
M runtime/lib/object_patch.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Mads Ager (google)
8 years, 3 months ago (2012-09-24 10:08:22 UTC) #1
Mads Ager (google)
https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart File lib/core/object.dart (right): https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode54 lib/core/object.dart:54: external void noSuchMethod(String name, List args); The void return ...
8 years, 3 months ago (2012-09-24 10:13:13 UTC) #2
Lasse Reichstein Nielsen
LGTM! https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart File lib/core/object.dart (right): https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode10 lib/core/object.dart:10: * Object constructor. That's obvious. This constructor is ...
8 years, 3 months ago (2012-09-24 10:43:18 UTC) #3
Mads Ager (google)
8 years, 3 months ago (2012-09-24 11:07:15 UTC) #4
https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart
File lib/core/object.dart (right):

https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode10
lib/core/object.dart:10: * Object constructor.
On 2012/09/24 10:43:18, Lasse Reichstein Nielsen wrote:
> That's obvious. This constructor is only here because it's const, otherwise it
> would have been implicit. So instead document when you would use it ...
> something like:
> /**
>  * Creates a new [Object] instance.
>  *
>  * [Object] instances have no meaningful state, and are only
>  * useful through their identity. An [Object] instance is  
>  * equal to itself only, and not to any other object.
>  */
> ?
> 

Done, thanks.

https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode32
lib/core/object.dart:32: * there are no distribution guarantees.
On 2012/09/24 10:43:18, Lasse Reichstein Nielsen wrote:
> I really want to promise that hash-codes are 32-bit unsigned integers (which
is
> kind-of a distribution guarantee - it rules out the really stupid
> implementations like what we have for double). Do you see any problems with
> going that way?

I don't see a problem with using 32-bit unsigned integers for the default hash
codes. However, since the language has no concept of 32-bit unsigned integers I
don't think it makes sense to add a comment to that effect.

https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode54
lib/core/object.dart:54: external void noSuchMethod(String name, List args);
On 2012/09/24 10:43:18, Lasse Reichstein Nielsen wrote:
> If anything, we should change it to Dynamic. And yes, I think we should change
> it. It's all equivalent for this implementation, since it always throws, but
it
> will set the style for people overriding noSuchMethod. (Remember to change
> patches too).

I have changed it to Dynamic.

https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode57
lib/core/object.dart:57: * Returns the representation of the runtime type of the
object.
On 2012/09/24 10:43:18, Lasse Reichstein Nielsen wrote:
> the representation -> a representation.
> We don't guarantee that it's the same object every time.

Done.

https://codereview.chromium.org/10974004/diff/1/lib/core/object.dart#newcode63
lib/core/object.dart:63: * Representation of the runtime type of an object.
On 2012/09/24 10:43:18, Lasse Reichstein Nielsen wrote:
> Just "Representation of a type." You can get representations of
non-instantiable
> types too.

Done.

Powered by Google App Engine
This is Rietveld 408576698