[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: STL like algorithms for Lua
- From: Vincent Manis <vmanis@...>
- Date: Thu, 1 Apr 2010 21:58:19 -0700
On 2010-04-01, at 20:13, King, Mike wrote:
>> Hmm, it would be much easier and cleaner to use STL algorithms in lua
>> than in c++.
>
> I'm sure you are right. I don't think it can get any worse.
>
>> And, perhaps it is so easy, no existing implementations to share?
>
> You're probably right, but it would be nice to have a "standard."
I don't think STL is a great model for a data structures library in Lua. For one thing, STL is based on templates, and having the compiler select appropriate code via template specialization. C++'s templates and specialization form a Turing-complete programming language; for the horrific details, see Andrei Alexandrescu's _Modern C++ Design_, published by Addison-Wesley in 2001 (warning, this book is NOT for the squeamish!).
That said, a good, standardized data structures library would be a nice addition to Lua. If it used consistent programming conventions, it could not only be valuable for the services it provides, but also as a demonstration of
good Lua style.
-- vincent