Add class?::method syntax #2185

Closed
paulmillr opened this Issue Mar 8, 2012 · 6 comments

Comments

Projects
None yet
4 participants

Just for consistency.

object?.method works. class?::method doesn't.

Collaborator

michaelficarra commented Mar 8, 2012

You mean someValidIdentifier?::method, right?

Yep.

:: is a short-cut for prototype, unlike . which is for accessing the menber of the object. So, for the given proposal, it could be interpreted as someValidIdentifier?.prototype.method. How about someValidIdentifier::?method?

@OnesimusUnbound I'm pretty sure that it's meant to be interpreted as someValidIdentifier?.prototype.method.

Hmm, for that case we have to tag ?:: as an operator, just like ?. and ?=. I wonder what will be the use case for ?::?

closed by b3452c1

@paulmillr paulmillr closed this Mar 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment