lua-users home
lua-l archive

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


hi, Eric,

Thanks for the detailed explanation.

I had written a C++ - Lua binder once for an RPG game, after using Wax and LuaCocoa for iOS and Mac projects, never want to go back to use that template oriented bridge.

/hz

> 
> 
> Hi, I’m the author of LuaCocoa. I thought I would chime in.
> 
> So Swift is currently a very compile-time oriented language. I haven’t
> done a deep dive into pushing on the dynamic side of Swift yet
> (because it is still a little wild-wild-west on even just the
> traditional C/static-side interoperability where I am spending my
> time), but my overall impression is that building a bridge like
> LuaCocoa out of Swift isn’t going to be viable (assuming no ‘cheating’
> by calling the Objective-C runtime).
> 
> Within the Cocoa community, some prominent veterans have raised
> concerns about the lack of dynamic features in Swift because there are
> certain features and patterns in Cocoa that are easy to implement in
> Obj-C, but very hard in Swift.  The Swift development team has
> responded (on the Swift mailing list) that they are interested in
> solving these problems, but are not there yet. It is a combination of
> trying to implement these features that makes sense for the Swift
> language as a whole, as well as priorities. The people who need
> dynamic features are mostly framework authors, and actually a niche
> within that group. And since Swift doesn’t even have a stable ABI yet,
> there aren’t a lot of framework authors, so you might imagine that
> priorities are focused on other things.
> 
> 
> If you wanted to do a Swift-Lua bridge today, I would imagine you
> would have to do it like the C++ bridges of today, i.e. relying on
> code generation and generics to create the bridging at compile time.
> 
> 
> -Eric
>