lua-users home
lua-l archive

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


> On 18 Sep 2018, at 22.32, Coda Highland <chighland@gmail.com> wrote:
> 
> Not all OOP looks like C++ or Java. Carrying callbacks in your data is
> still OOP.
> 
> Having an object with optional event handlers is a form of OOP that's
> actually OLDER than C++.

I disagree. Using function pointers does not automatically mean that it’s OO. Especially since with the callbacks there’s no direct correlation between functions and data (the callbacks may not even get the pointer to the data, for example with continuations). I’m pretty sure jump tables & function ptrs predate OOP by at least a decade, so saying that any code that uses function pointers is automatically OO sounds weird.

Petri