[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table library changes (was Re: table.new in 5.3?)
- From: Justin Cormack <justin@...>
- Date: Wed, 27 Nov 2013 17:16:02 +0000
On Wed, Nov 27, 2013 at 11:28 AM, John Hind <john.hind@zen.co.uk> wrote:
>> From: Dirk Laurie <dirk.laurie@gmail.com>
>> Subject: Re: table library changes (was Re: table.new in 5.3?)
>
>> > C is no less dogfooding than implementing it in Lua.
>>
>> So, while I personally just love compiling little C libraries for Lua,
>> I have some sympathy for those that would prefer not to.
>
> Yes, and there is no reason I can see why the standard libraries should not be, at least partly, implemented in Lua. In fact I would encourage the team to consider re-implementing the standard libraries entirely in Lua and extending the C API as necessary to support this.
>
> I've just re-implemented my replacement Table library (OO version) so it is entirely Lua except for the List class which starts off in C with just a 'sort' method and all the other methods are added in Lua. Dirk also had a neat composite approach with a low-level partial sort implemented in C which could be wrapped in higher-level Lua functions implementing various full sort algorithms.
Interesting, but shouldn't the stuff that can be implemented in Lua be
removed form the language? ;-) Adding more C support for things does
sounds good though.
Justin