Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API docs for StaticArray #6404

Merged
merged 2 commits into from Jul 18, 2018

Conversation

straight-shoota
Copy link
Member

No description provided.

@@ -1,4 +1,26 @@
# A fixed-size, stack allocated array.
#
# `StaticArray` is a generic type with type argument `T` specifying the type of
# it's elements and `N` the fixed size. For example `StaticArray(Int32, 3)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "its" instead of "it's" is correct here.

@@ -1,4 +1,26 @@
# A fixed-size, stack allocated array.
#
# `StaticArray` is a generic type with type argument `T` specifying the type of
# its elements and `N` the fixed size. For example `StaticArray(Int32, 3)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be

its elements and N is the fixed size.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a deliberate omission. The second part of the sentence contains an elliptical construction (it would be specifying).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@straight-shoota Thanks for explanation. TIL.

# ```
#
# The generic argument type `N` is a special case in the type grammar as it
# doesn't specify a type but a size. It's value can be an `Int32` literal or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn 🔥

@straight-shoota
Copy link
Member Author

I added an example for use with uninitialized. @RX14 @jhass could you pleas re-review?

Added an example for use with `uninitialized`
@RX14 RX14 merged commit 6ab9c60 into crystal-lang:master Jul 18, 2018
@RX14 RX14 added this to the Next milestone Jul 18, 2018
@straight-shoota straight-shoota deleted the jm/docs/static-array branch July 19, 2018 01:08
@RX14 RX14 modified the milestones: Next, 0.26.0 Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants