lua-users home
lua-l archive

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


Hi,

Yes. I mean something similar to:

waxClass {MyClass, SwiftFoo, protocols = {...}}

/hz



Hey

I think flosoftware probably meant defining a Swift class from Lua, as one could do with, say, LuaCocoa.

I'm not an expert on Swift, but it's not currently a particularly dynamic language, so it may not actually be possible to define entirely new classes at runtime. Its creator, Chris Lattner, spoke about this on the atp.fm podcast recently and said that dynamicism is planned for Swift.

Cheers,
Chris

On 26 January 2017 at 17:35, Andrew Starks <andrew@starksfam.org> wrote:
On Thu, Jan 26, 2017 at 11:20 AM, fiosoftware <hz@fiosoftware.com> wrote:
> Checked that, seems no support for defining class from Lua side. Right?
>
>
>
>
> On Jan 26, 2017, at 9:24 AM, hz <hz@fiosoftware.com> wrote:
>
> hi, All,
>
> Given the lack of runtime support of Swift, is it safe to say it’s
> impossible now to implement a Swift-Lua bridge for production (feature set
> similar to Wax or LuaCocoa)?
>
> Best Regards,
> /hz
>
>
> See https://github.com/sdegutis/lua4swift.
>
> Preston

What is a Lua class?

Which is to say, in order for the binding to support Lua classes, it
would need to pick one way to represent them and then create a bridge.
Given that class-like behavior in Lua can be done in many ways, that
is probably beyond the scope of a binding, even though the ability to
marshal classes from either side would be valuable.
--
Andrew Starks




--
Cheers,

Chris