A plea for help from Erlang gurus
Thu Dec 18 16:34:12 CET 2003
On 18 Dec 2003, Luke Gorrie wrote:
> Taavi Talvik <taavi@REDACTED> writes:
> > I have system, which tries to classify events based on
> > their properties. And I am trying to simplify writing
> > some special code for acting on property lists.
> > I would like to write modules/rules in fashion of:
> How about using a record instead of an association list? If you don't
> have too many distict fields, this would be quite neat, and let you
> write code pretty much like you describe.
That's true. However there are too many fields. Or actually
fields, which I do not know beforehand. Fiew of them can be
standardised (ala event_source, time). But all of them cannot be
Event from cisco router contains entirely different
properties, than event from xDSL or events from coffe machine. And
their classification is based on different rules. Maybe someone
wants special treatment of event based on customer address, someone
else wants classification based on time of day etc.
It would be nice when end users themselves can add additional
Erlang is almost perfect match with it's pattern matching, guard
tests and simple enough syntax.
More information about the erlang-questions