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

Some pointer sugar. #27

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Some pointer sugar. #27

wants to merge 1 commit into from

Conversation

saeta
Copy link
Owner

@saeta saeta commented May 22, 2020

This, unfortunately, is somewhat unsatisfying, as it cannot obviate
all need for .pointee. In particular, it cannot satisfy the case
when the pointee needs to be modified in some fashion. (i.e. inout)

This, unfortunately, is somewhat unsatisfying, as it cannot obviate
all need for `.pointee`. In particular, it cannot satisfy the case
when the pointee needs to be modified in some fashion. (i.e. `inout`)
@saeta saeta requested a review from dabrahams May 22, 2020 01:56
@saeta saeta changed the title First attempt at some pointer sugar. Some pointer sugar. May 22, 2020
@dabrahams
Copy link
Collaborator

…thus driving home the reason I always argued this should be spelled subscript(), i.e. p[]

Copy link
Collaborator

@dabrahams dabrahams left a comment

Choose a reason for hiding this comment

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

IMO this should be the empty subscript so it works with lvalues, or nothing at all with the rationale that [] only saves one character over [0], and then we should decide that [0] is OK.

@texasmichelle texasmichelle changed the base branch from master to main December 8, 2020 01:30
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