ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: [SimPEL] Adding with
Date Wed, 19 Dec 2007 21:47:41 GMT
On 12/19/07, Matthieu Riou <matthieu@offthelip.org> wrote:
>
> On Dec 19, 2007 11:45 AM, Assaf Arkin <arkin@intalio.com> wrote:
>
> > On 12/19/07, Matthieu Riou <matthieu@offthelip.org> wrote:
> > >
> > > Here c, v, ca and va are actually aliases to the original path. I'd
> also
> > > propose (optional) that a non-existent path used in *with* gets
> created
> > if
> > > it doesn't exist when a *with* relies on it. So in my previous example
> > if
> > > customer.payload.ns::customer doesn't exist, we create this XML
> > structure
> > > and set it on customer.
> >
> >
> > If you meant for it to exist, it would be there.  If you didn't mean for
> > it
> > to exist, then I would expect it to fail.  The idea of data created
> > magically is too much black magic for me.
> >
>
> I agree. And still think this is needed. The selection failures on
> initialized variables is the single most encountered problem in the ODE
> user
> mailing list. And I don't even count those who tried their first process
> to
> get a feeling of it, got their first selection failure and then went to
> something else without bothering abut subscribing to the mailing-list.
>
> I just *know* that people will write stuff like the following snippet
> without having initialized the customer structure.
>
>   customer.payload.ns::customer.ns::firstname =
> visitor.payload.ns::customer.ns::fname;
>
> Now maybe that should be part of something else and not included in
> *with*.
> I just don't know what that something else should be.


This won't work in any language I know, take Ruby for example:

msg['customer']['firstname'] =  'Assaf'

will complain that it doesn't understand calling [] on nil, which is easily
fixed:

msg['customer'] ||= {}

Assaf

Matthieu
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message