lua-users home
lua-l archive

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


On Fri, Dec 19, 2014 at 4:42 AM, quoth steve donovan:
> On Fri, Dec 19, 2014 at 4:45 AM, Steven Degutis <sbdegutis@gmail.com> wrote:
>> My plan is to first transliterate it, since Lua is written in such
>> vanilla C that it should produce nearly equivalent Swift code.
>
> Would not an ObjC port make more sense? It provides the special
> interop sauce you need, and already is a C superset. Besides, I get
> the feeling that Swift is not really living up to its name yet ;)

Since ObjC is already a superset of C, Lua is already valid ObjC code.
So that port has technically already been done by PUC-Rio ;)

But I assume you mean port it to use ObjC features such as classes,
and Foundation classes such as NSArray, NSDictionary, NSNumber, and
NSString. These classes are not nearly as good as Swift's equivalents.
Plus ObjC's interop with C data types is awful, whereas Swift can have
an Array of Ints. Not to mention ObjC lacks generics and a plethora of
other useful features that Swift brings.