[erlang-questions] distinguishing function by arity

Richard Carlsson <>
Mon May 12 23:06:58 CEST 2008


DougEdmunds wrote:
> Is there a performance hit caused by
> using the same function name with
> alternative arities (such as add/2, add/3)
> instead of using different function
> names (such as add2/2, add3/3)?

No. Effectively, the arity is part of the function name,
so add/2 and add/3 really have different entry points.

     /Richard



More information about the erlang-questions mailing list