Skip to content

Conversation

dlibenzi
Copy link
Collaborator

No description provided.

@dlibenzi dlibenzi requested a review from asuhan January 17, 2019 18:30
@dlibenzi dlibenzi merged commit f6c5412 into master Jan 17, 2019
@dlibenzi
Copy link
Collaborator Author

You prefer mutable?
I find it weird (unless in very rare occasions) that the state of an object changes upon const reference passing.
Current we have Current*() and Get*() APIs, for device data, IR node and tensor data.
And the Get*() are the one which "must get" a given entity. So changing the state of the object is expected.

@asuhan
Copy link
Contributor

asuhan commented Jan 17, 2019

I don't really "prefer" it, but it's the lesser evil here. If the methods are at least logically const, but they happen to mutate some internal state or cache, I'm usually fine with making that mutable.

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.

2 participants