[m-rev.] for post-commit review: getters and setters in deep profiler
Paul Bone
pbone at csse.unimelb.edu.au
Wed Jan 7 10:55:41 AEDT 2009
On Tue, Jan 06, 2009 at 05:53:13PM +1100, Zoltan Somogyi wrote:
> 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.
Oh! Now I understand. I thought this was for procedures created by the
field access code such as:
Struct ^ field = Value.
Which don't get compiled as procedures anyway. But instead for the
human-written functions and procedures like hlds_info_get_detism
> > 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".
I don't know what you mean. But my comment here isn't relevant anymore.
> > 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.
This was due to my misunderstanding.
I understand how is_getter_or_setter_2 works now and why it is written
this way (without splitting the string on the '_' delimiter).
Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20090107/ceaa8f3e/attachment.sig>
More information about the reviews
mailing list