public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Craig Ringer <craig@2ndquadrant.com>
Cc: systemtap@sourceware.org
Subject: Re: Associative array "pop" ?
Date: Tue, 16 Feb 2021 16:40:52 -0500	[thread overview]
Message-ID: <877dn77ksv.fsf@redhat.com> (raw)
In-Reply-To: <CAMsr+YHEj7wKsvRXy0bKxfzAnCYeQ09C5NJUsOYPw+Yyb5P-9Q@mail.gmail.com>

Craig Ringer <craig@2ndquadrant.com> writes:

> x_foo = foo[x]
> if (x_foo != 0)
>     delete foo[x]
>     # do something with x_foo
> }

This is probably:

https://sourceware.org/bugzilla/show_bug.cgi?id=10837

... except the "value = delete foo[i]" syntax is kind of meh, and
doesn't work with slice ops like "delete foo[*]".  A functional syntax
like @pop() would look okay.  We try to not introduce new keywords,
except in the @-space, and even there only with version-conditional
parsing.

- FChE


      reply	other threads:[~2021-02-16 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  2:32 Craig Ringer
2021-02-16 21:40 ` Frank Ch. Eigler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dn77ksv.fsf@redhat.com \
    --to=fche@redhat.com \
    --cc=craig@2ndquadrant.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).