[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12215: CSET is unnecessarily confusing
From: |
Paul Eggert |
Subject: |
bug#12215: CSET is unnecessarily confusing |
Date: |
Wed, 22 Aug 2012 09:35:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 08/22/2012 06:27 AM, Stefan Monnier wrote:
>> That does avoid the ambiguity but it's pretty weird.
> Less weird than CSET (XCHAR_TABLE (char_table), parent, parent),
> and avoids the duplication of code we have with set_char_table_foobar.
True in both cases. I suppose the notation could grow on one.
A few other thoughts. First, why would we need multiple setter
macros (CSET, BSET, etc.)? Why can't we have just one macro?
That is, why does CSET (P, .FIELD, VAL) care what P's type is?
Surely one generic macro will do.
Second, why does the setter need the pointer to the start of
the object, as well as a pointer to the field that's changing?
Doesn't the latter suffice in a copying collector? That is,
why can't we just turn this into something like:
fset (&XCHAR_TABLE (char_table)->parent, parent);
? That's shorter and simpler and avoids the need for a macro.
Third, I agree with Stefan that it'd be reasonable to put all
this setter stuff into a branch, and I'll volunteer to do
that (i.e., change back to plain assignments in the trunk,
and create a new branch called "gc" or whatever). But I recall
that Dmitry had serious qualms about that so I would like to
hear his opinion.
- bug#12215: CSET is unnecessarily confusing, Paul Eggert, 2012/08/16
- bug#12215: CSET is unnecessarily confusing, Dmitry Antipov, 2012/08/17
- bug#12215: CSET is unnecessarily confusing, Stefan Monnier, 2012/08/21
- bug#12215: CSET is unnecessarily confusing, Stefan Monnier, 2012/08/21
- bug#12215: CSET is unnecessarily confusing, Paul Eggert, 2012/08/21
- bug#12215: CSET is unnecessarily confusing, Stefan Monnier, 2012/08/23
- bug#12215: CSET is unnecessarily confusing, Paul Eggert, 2012/08/23
- bug#12215: CSET is unnecessarily confusing, Chong Yidong, 2012/08/23
- bug#12215: CSET is unnecessarily confusing, Paul Eggert, 2012/08/23
- bug#12215: CSET is unnecessarily confusing, Dmitry Antipov, 2012/08/24
- bug#12215: CSET is unnecessarily confusing, Stefan Monnier, 2012/08/24
- bug#12215: CSET is unnecessarily confusing, Paul Eggert, 2012/08/24
- bug#12215: CSET is unnecessarily confusing, Tom Tromey, 2012/08/24