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

{}:delete and {}:exists up to spec #138

Closed
wants to merge 8 commits into from
Closed

{}:delete and {}:exists up to spec #138

wants to merge 8 commits into from

Conversation

lizmat
Copy link
Contributor

@lizmat lizmat commented May 14, 2013

No description provided.

This also fixes a cut-n-paste typo where :exists would actually :delete.
As suggested by jnthn++ yesterday
@pmichaud
Copy link
Contributor

  1. Instead of adding more "where 0" candidates, might it be better to simply change the existing candidates to be :$delete where ?$delete, and let it fall back naturally to other candidates on failure?
  2. Similarly, even if we keep the extra candidates, I'd feel more comfortable testing boolean true/false than smart matching against numeric 0.

Pm

@pmichaud
Copy link
Contributor

jnthn++ points out that there should be a bang (!) after the named argument, as in :$delete! where ?$delete. (I intended the bang to be there but forgot.)

There's a question as to whether "fallback" will work once .{} is implemented as a sub instead of a method.

Pm

Basically, get rid of the where 0 candidates.  Let :delete have its own
candidate and fall back on no parameter if false.  Let the :exists(True|False)
be handled by a single candidate.  Shorten :x($x) to :$x.
@lizmat
Copy link
Contributor Author

lizmat commented May 15, 2013

Looking forward to getting more feedback and or seeing these commits merged :-)

@lizmat lizmat closed this May 19, 2013
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.

None yet

2 participants