[M3devel] set operations parse.c?
Tony Hosking
hosking at cs.purdue.edu
Thu Mar 4 04:27:55 CET 2010
It obscures the simple intent of the eq/ne operations, and conflates them with other similarly simple set operations.
Agreed, the implementations now vary in only one token, but I can read them each in a single page of my editor and validate their correctness without having to trace through multiple calls and track a flag value in context along the way.
On 3 Mar 2010, at 19:45, Jay K wrote:
> The flag to setop is maybe yucky, but I think
> static void m3cg_set_eq (void) { m3cg_set_eq_or_ne(EQ_EXPR); }
> static void m3cg_set_ne (void) { m3cg_set_eq_or_ne(NE_EXPR); }
>
>
> is still good.
> There are two functions *very* similar in functionality that vary in only one token.
>
>
> The counterpoint would be, perhaps, if one is proficient enough
> in maintaining parse.c, that the two functions are small and
> one could write them up in a flash without referring to examples.
EXACTLY!
> One needs that level of proficiency to make more significant changes anyway.
> (I'll be removing the set_singleton/member functions shortly, assuming
> reasonable codegen.)
>
>
> - Jay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100303/5ab8c2da/attachment-0002.html>
More information about the M3devel
mailing list