[DGD] Re: My idea for the DGD driver - validate

Robert Forshaw iouswuoibev at hotmail.com
Fri Feb 13 01:57:34 CET 2004


>"Robert Forshaw" <iouswuoibev at hotmail.com> wrote:
>
> > >From: Erwin Harte <harte at is-here.com>
> > >Perhaps you've noticed 'private' and 'static' functions in other code?
> > >I believe these will allow you to do 99% of what you want, already.
> >
> > You would know that I have if you read the entire post, as I mention 
>these
> > keywords. You would also know that 99% of what I want cannot be 
>fulfilled by
> > 'private' and 'static'.
>
>I read your postings, and I do not see you refer to static functions
>anywhere.  Perhaps that bit was also mysteriously omitted?  After
>reading them as they were posted, the assumption that you didn't know
>about static functions is not unreasonable.

Then we have a difference of opinion. Being ignorant of static and not of 
private seems very unlikely to me. I thought it would be obvious from my 
posts that I'm not so inept as to not know what they are. As to the 'static' 
being ommited, yes I didn't mention static. I thought I had. Not that it 
matters, since none of it was really applicable to my post.

>
>Regarding calling security, I think one mistake was made during the
>inception of LPC: functions (and variables) should be private by
>default.  Unfortunately it is now too late to change this.

This would of course require the inclusion of 'public' (like other drivers 
seem to possess, but dgd doesn't...).

>
>By masking call_other(), you are making things needlessly complex.

How come? I thought it was a good point that kevinc/Steve Foley mentioned. 
While I definitely would not say no to my validate idea being included in 
DGD, as it would make the solution even easier to implent and would be less 
costly, the feature can still be achieved by masking call_other can it not? 
Here's what my masking function looks like:

mixed call_other(mixed obj, string function, mixed args...)
{
    if(function_object("verify_call_other", find_object(obj)))
          if(!::call_other(obj, "verify_call_other", function, args))
                return nil;

    return ::call_other(obj, function, args...);
}
I
>suspect that you may still not quite get the effect you are looking
>for.  Personally, I like the validate(); idea.

Could you explain what unexpected effects I have missed? I'm glad you liked 
the idea. Is it useful enough to be included in the source?

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list