public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Siva Chandra <sivachandra@google.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC/Patch] Call overloaded operators to perform valid Python operations on struct/class values.
Date: Mon, 16 Dec 2013 07:48:00 -0000	[thread overview]
Message-ID: <CAP9bCMSPpz8px2ZFvRroHcNP8PWWQV39P7GmXCmj+fdSR7NT2Q@mail.gmail.com> (raw)
In-Reply-To: <871u1j2ldi.fsf@fleche.redhat.com>

On Wed, Dec 11, 2013 at 12:17 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <xdje42@gmail.com> writes:
>
> Doug> I'm not yet comfortable enough with going this route to approve it.
>
> It seems fine to me.
>
> Doug> It feels sexy and all, but it's not clear to me going this path is
> Doug> a net win.
>
> What are the negatives?  Your email leaves little to either agree or
> argue with.  A little more insight into your reasoning might be useful.

My concern is basically that one can only go so far mapping Python to
the target language (or, can we get a "mode" (for lack of a better
word) in Python of accepting the syntax of the target language?)

Does it make sense to support what one can (arithmetic ops, a few
others), and leave it at that?  I don't know.
Every feature adds complexity, and this feature can never be complete
(I could certainly be wrong ... it would be interesting if all C++
operators could be supported).

Note that I'm not disapproving the feature ... if someone else
approves the patch I'm not going to object.
For myself, I'm just going slow on this one.  E.g., is there another
way to provide this?
E.g., some kind of facility that uses gdb's language parsers but let's
one pass in gdb.Value objects from Python?
It sounds doable, but I haven't thought about it very hard (it might
not even make sense, or it may require more effort).
Its drawback to the current proposal is that it would be a bit more
verbose, but it has to potential of handling a lot more cases.

  reply	other threads:[~2013-12-16  7:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 19:28 Siva Chandra
2013-12-06  6:25 ` Doug Evans
2013-12-06 14:20   ` Siva Chandra
2013-12-11 20:18     ` Tom Tromey
2013-12-11 20:17   ` Tom Tromey
2013-12-16  7:48     ` Doug Evans [this message]
2013-12-16 22:24       ` Siva Chandra
2013-12-18 16:37         ` Doug Evans
2013-12-18 23:15           ` Siva Chandra
2013-12-19 14:11             ` Doug Evans
2013-12-19 17:50               ` Siva Chandra
2013-12-20 22:29                 ` Siva Chandra
2013-12-21  8:21                   ` Eli Zaretskii
2013-12-30 14:40                     ` Siva Chandra
2013-12-30 17:57                       ` Eli Zaretskii
2014-01-22 21:39                       ` Siva Chandra
2014-01-25 18:45                         ` Doug Evans

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=CAP9bCMSPpz8px2ZFvRroHcNP8PWWQV39P7GmXCmj+fdSR7NT2Q@mail.gmail.com \
    --to=xdje42@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.com \
    --cc=tromey@redhat.com \
    /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).