lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Aug 2, 2019 at 12:19 AM Soni "They/Them" L. wrote:
> On 2019-08-01 6:05 p.m., Egor Skriptunoff wrote:
>> Could you provide an example to show benefits of traits?
>> What kinds of tasks traits solve better than conventional
>> 'objects-and-methods' approach?
>>
>
> I recommend reading https://en.wikipedia.org/wiki/Entity_component_system

(Well, besides reading that, I recommend actually checking out Rust and
using it for a while. You'll see what I mean.)


Could you just show a simple example from real-life programming where using traits is better than not using them?
Such example should be understandable by any Lua programmer (without Rust knowledge).
If you can't provide such example then why Lua users might want to use Cratera?