[erlang-questions] erlang *****

Alpár Jüttner alpar@REDACTED
Tue Mar 18 13:20:03 CET 2008


> This is very different from allowing a subtle change in a complex
> pattern match to shift evaluation from constant-time or linear
> to NP - especially when programmers have learned to expect
> and appreciate that pattern-matching is predictable in cost.

Once again, please: NP does _not_ mean non-polynomial, but something
very-very different. If you want to say "worse than polynomial" you can
say "superpolynomial" or "exponential" (if the running time is indeed
something like O(2^n)).

> I am very much in favour of keeping Erlang's pattern-matching
> both pure and predictable in cost.

But, if the left-to-right rule was used for evaluating the disjunctive
pattern matching, it would meet your requirements, wouldn't it?

Best regards,
Alpar




More information about the erlang-questions mailing list