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

Deprecate names for composite types in favor of fieldnames #10332

Merged
merged 2 commits into from
Feb 27, 2015

Conversation

jakebolewski
Copy link
Member

Closes #10325.

@JeffBezanson
Copy link
Member

I thought the idea was to use fieldnames just to mean the field names of a composite type, and names for other things, like the exported names of a module.

@jakebolewski
Copy link
Member Author

Yeah, I was not really sure about that. I'll change it.

@jakebolewski jakebolewski changed the title Deprecate names in favor of fieldnames Deprecate names for composite types in favor of fieldnames Feb 26, 2015
@jakebolewski
Copy link
Member Author

The module changes have been removed.

@ivarne
Copy link
Member

ivarne commented Feb 26, 2015

Looks good, but this should be in NEWS.md

@@ -797,7 +797,7 @@ sparse(D::Dense) = sparse(Sparse(D))
# Calculate the offset into the stype field of the cholmod_sparse_struct and
# change the value
function change_stype!(A::Sparse, i::Integer)
offset = fieldoffsets(C_Sparse)[names(C_Sparse) .== :stype][1]
offset = fieldoffsets(C_Sparse)[9] # field offset of C_Sparse.stype
Copy link
Contributor

Choose a reason for hiding this comment

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

no one is going to remember to change this...

- deprecate names()
- abstract getting number of fields with `nfields`
@@ -28,7 +28,7 @@ New language features

Language changes
----------------

Copy link
Member

Choose a reason for hiding this comment

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

What?

Adding trailing whitespace?

Copy link
Member Author

Choose a reason for hiding this comment

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

shamed :(

jakebolewski added a commit that referenced this pull request Feb 27, 2015
Deprecate `names` for composite types in favor of `fieldnames`
@jakebolewski jakebolewski merged commit 2e27655 into master Feb 27, 2015
@jakebolewski jakebolewski deleted the jcb/fieldnames branch February 27, 2015 00:40
@JeffBezanson
Copy link
Member

For shame, there is no doc update here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename names to fields or fieldnames?
5 participants