On (02/19 21:49), Scott wrote:
> But it could result in 
> some very miffed new users screaming "Why the hell cant you do this?".  

funny. i thought that's what i was saying here.

why can't i post an event to another session from that session's object?

> Basically, we simply have to check to ensure that whatever is being 
> preformed is being preformed by the currently active session in order to 
> disallow other sessions from being abusive in really unfriendly ways 
> that aren't necessarily clear in thier unfriendliness.  

i don't think operating on the non-current session is abusive or
unfriendly.  i don't think even setting aliases on a remote session is
unfriendly. it allows me to extend that session, much like a subclass
would, without ever having to touch its code.

> But thats 
> forcibly sane, you cannot operate on another sessions aliases...you dont 
> have that option (Without delving deeply into shit thats very obvious 
> you really shouldn't be delving into anyway, that is).

its not deep. given the object, the kernel provides very handy ways of
accessing and modifying aliases. oh yeah, you can also modify its very
event structure that way too.

but really, you've changed the subject.  i wasn't talking about aliases.
i was talking about event dispatch.  we were talking about one specific
piece of api that can be fixed to be much more clear. i don't really
have interest in saving the world right now because i don't have time to
code that big of a patch.

i think adding an event dispatch method set to the session, even if it
just called the kernel methods behind the scenes, would help clarify the
api.  assuming we just add the two methods currently implemented for
event dispatch, things become pretty clear in several spots

    $_[SENDER]->post('thanks_for_the_fish' => $fish);

    $_[SESSION]->post('do_something'); 
        # much clearer to me than $_[KERNEL]->yield('do_something');
    
    $_[SESSION]->call('pie');

The semantics become very explicit as to who we're operating on with a
minimum of noise. 

--
Matt Cashner
http://eekeek.org
eek at eekeek dot org

Reply via email to