Hi Ken,
----- Original Message -----
> [...]
> And the multistate example becomes
>
> ruleset
> extreme_predicate -> print "panic"
> else bad_predicate -> print "alarm"
> else unusual_predicate -> print "warning"
> else print "OK";
>
> I've done enough of the implementation to know this will work for the
> parser and the execution engine without major disruption.
>
Oh, I'm a big fan of this approach - I remember us chatting about it back
when Aconex first encountered this problem (back when I proposed to do it
in one day for a hackathon - rightly becoming the subject of much mirth!).
One issue was the way there isn't just true or false, there's also "maybe"
(first sample for a counter, or host is down) - what would be the approach
there? Would it just fall through into that final else catch-all branch?
Heh, that would be the one that says "OK" above? ;) Might need some other
syntax for that case?
> Of course "ruleset ... else ... ;" could be replaced by "if ... elif ...
> elif ... else ...;" or any equivalent cosmetic change to the suggested
> syntax.
(personally I don't have a strong preference either way)
> Warm up the flame throwers ...
Not at all, as far as I'm concerned - if you think this is doable, I'd love
to see it happen. I know of some production environments where it would be
immediately put to use.
cheers.
--
Nathan
|