lua-users home
lua-l archive

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


> -----Ursprüngliche Nachricht-----
> Von: lua-l-bounces@lists.lua.org <lua-l-bounces@lists.lua.org> Im Auftrag
> von Petri Häkkinen
> Gesendet: Montag, 17. September 2018 19:24
> An: Lua mailing list <lua-l@lists.lua.org>
> Betreff: Re: Thought experiment: what would you remove from Lua


> Especially with a powerful dynamic language such as Lua I see no need for
> rigid classes & inheritance.

This, very much. F.i. I have all kinds of functions working with "rectangles", like
intersections, collisions checks, grow/shrink/point inclusion etc. etc. but there's
no need to limit the usage to any predefined type. In my case it's just tables and
as long as they contain x/y/width/height key/value pairs, they're valid data.

It's much much more reusable than any OOP/interface construct, no dependency
or coupling of any kind.