[rules-dev] 'if' in guided editor

Michael Neale michael.neale at gmail.com
Mon Feb 26 19:47:08 EST 2007


well, its good to take a position on something, so lets have an opinion, and
make it "when" cause "if" is for sequential logic in imperative languages !

So "When" it is !



On 2/27/07, Mark Proctor <mproctor at codehaus.org> wrote:
>
>  It's not so much imperative/declarative but that if indictes its part of
> a sequence of logic, when is more atomic - but it is contrived :)
>
> Michael Neale wrote:
>
> yes its only a tool thing, exactly. purely for the UI, so it can say
> whatever we want.
>
> "When" is OK with me - but I am not sure if the argument of if ==
> imperative vs. when == declarative is the best - it may make sense to new
> users, but it does sound a little contrived to me (I always cringed at the
> explanation).
>
> I guess pragmatically speaking: Java, C, C#, C++, perl, python, ruby all
> have "if" but not "when" - given they are the most common imperative
> languages, using "when" probably makes good sense as a differentiation point
> now I think of it.
>
> The Rule Modeller localisation mainly comes down to i18n style .properties
> files anyway - whereas DSL is user customisable - but we could make it use a
> DSL file eventually.
>
> basically, platofrm i18n will eventually be done by engineering services
> here, but it will really be based on user demand, whereas DSL allows users
> to do what they want when they want.
>
> On 2/27/07, Edson Tirelli <tirelli at post.com> wrote:
> >
> >
> >    Mark,
> >
> >    Yes, from a DSL Compiler perspective, keywords are customizable. But
> > from tools perspective, they need to add support to that. Also, I think
> > Michael is generating DRL directly from the editor, aren't you Mic? So
> > this is only a tool thing...
> >
> >    []s
> >    Edson
> >
> >
> > Mark Proctor wrote:
> >
> > > Is using 'if' and 'when' confusing? should be not standardise over it?
> > >
> > > I think "when" is used as you say "when this then that" not "when this
> >
> > > maybe this or maybe that else that", where as if/else is a common
> > > usage - so helps emphasis that rules are more atomic.
> > >
> > > With Edson's work is this not all localisable now anyway? If so, need
> > > to make sure that the guided editors obey his keyword localisation
> > work.
> > >
> > > Mark
> > > Michael Neale wrote:
> > >
> > >> no, it was just to be different. It can be anything. It can be
> > >>
> > >> "wassup" or something ;)
> > >>
> > >> Not sure if that explanation has any real meaning, I mean it makes a
> > >> point, but "when" actually implies to me that it is slightly temporal
> >
> > >> (ie "when" means it will happen, at some point in time, where as "if"
> > >> means it may or may not happen - neither of which are
> > >> procedural/imperative).
> > >>
> > >> I think its ok to say IF, as people still say "if/then" for
> > >> production rules, its not really confusing - perhaps we need another
> > >> way to explain imperative versus declarative.
> > >>
> > >> On 2/26/07, *Mark Proctor* < mproctor at codehaus.org
> > >> <mailto:mproctor at codehaus.org>> wrote:
> > >>
> > >>     I noticed that 'if' is used in the guided editor instead of
> > >>     'when', whats the reason for this? As currently I explain the use
> > >>     of 'when' because it indicates its not procedular, where as 'if'
> > >>     is considered part of a procedural logic flow. Will this confuse
> > >>     that explanation?
> > >>
> > >>
> > >>
> > >>     Mark
> > >>
> > >>     _______________________________________________
> > >>     rules-dev mailing list
> > >>     rules-dev at lists.jboss.org <mailto:rules-dev at lists.jboss.org>
> > >>     https://lists.jboss.org/mailman/listinfo/rules-dev
> > >>
> > >>
> >
> > >>------------------------------------------------------------------------
> > >>
> > >>_______________________________________________
> > >>rules-dev mailing list
> > >>rules-dev at lists.jboss.org
> > >>https://lists.jboss.org/mailman/listinfo/rules-dev
> > >>
> > >>
> > >
> >
> > >------------------------------------------------------------------------
> > >
> > >_______________________________________________
> > >rules-dev mailing list
> > > rules-dev at lists.jboss.org
> > >https://lists.jboss.org/mailman/listinfo/rules-dev
> > >
> > >
> >
> >
> > --
> > Edson Tirelli
> > Software Engineer - JBoss Rules Core Developer
> > Office: +55 11 3124-6000
> > Mobile: +55 11 9218-4151
> > JBoss, a division of Red Hat @ www.jboss.com
> >
> >
> > _______________________________________________
> > rules-dev mailing list
> > rules-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-dev
> >
>
> ------------------------------
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20070227/5ffac2f3/attachment.html 


More information about the rules-dev mailing list