[m-rev.] for post-commit review: getters and setters in deep profiler

Zoltan Somogyi zs at csse.unimelb.edu.au
Tue Jan 6 17:53:13 AEDT 2009


On 06-Jan-2009, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> Is it possible to have a getter or setter named "_get_FIELD" or
> "_set_FIELD", that is with a blank data structure name?

Yes, though a programmer would have to be crazy to write such code.
The code should handle it anyway.

> If not this predicate should be split in two such that a datastructure
> name of non-zero length is enforced.  I beleive that this would be more
> readable.

I don't see how "not there" is more readable than "there even though in
a less than ideal format".

> In any case it's probably best to simply split the string on the '_'
> delimiter and ensure that each of the three components matches the
> strings in is_getter_or_setter 

What THREE components? Underscores can appear in names ANY NUMBER of times.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list