[erlang-questions] language change (?)

Paul Mineiro paul-trapexit@REDACTED
Tue Jun 19 18:21:36 CEST 2007


what about operator overloading (via parametric polymorphism)?

i.e. complex numbers,

-record(complex, { real, imaginary }).

operator+(A=#complex{}, B=#complex{}) ->
  #complex{real = A#complex.real + B#complex.real,
           imaginary = A#complex.imaginary + B#complex.imaginary}.

also, what about definition of new infix operators with precedence like
Haskell, e.g., to make parser combinators look alot cooler?

-- p



More information about the erlang-questions mailing list