Is it better to use pure Function assigned to symbols as their OwnValues vs function defined by patterns as symbol's DownValues.
Which one is faster and are there any exceptions?
Is it better to use pure Function assigned to symbols as their OwnValues vs function defined by patterns as symbol's DownValues.
Which one is faster and are there any exceptions?
DownValuesis more flexible. For example, this allows for overloading of functions and in combination withTagSetDelayed, you an implement your own "classes" (in the sense of object oriented programming). – Henrik Schumacher Jun 13 '18 at 22:23