[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What order should Lua be ported in?
- From: Steven Degutis <sbdegutis@...>
- Date: Fri, 19 Dec 2014 09:37:30 -0600
On Fri, Dec 19, 2014 at 4:42 AM, quoth steve donovan:
> On Fri, Dec 19, 2014 at 4:45 AM, Steven Degutis <firstname.lastname@example.org> 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.