On Thu, Aug 1, 2019 at 4:53 PM Soni "They/Them" L. wrote:
-- example from tests.cratera
From your example it's not clear why this feature is better than usual OOP syntax.
Actually you DO NOT need reference to 'e' inside trait's functions (get, set, size).
You can easily rewrite your program in traditional way by replacing
e:[inventory].size()
with
e[inventory]:size()
Could you provide an example to show benefits of traits?
What kinds of tasks traits solve better than conventional 'objects-and-methods' approach?