lua-users home
lua-l archive

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


Implicit conversions are idiomatic Lua but in this case I think it safer to be strict about the types. You will get more errors but you will get less strange behaviour when people give the wrong type and it still works but the result is "funny". IMAO it is better to be strict with types, especially in big applications where it can be difficult to otherwise trace type errors.

Robert


On 6 January 2014 23:07, Hisham <h@hisham.hm> wrote:
On 6 January 2014 16:49, Josh Haberman <jhaberman@gmail.com> wrote:
> Yes, my library "upb" is a larger effort of which bindings to Lua are
> just a part. I have schema classes and an optimized decoder written in
> C+DynASM that can be easily bound to any language runtime. And I have
> plans to extend this to other data formats like JSON and even to bind
> it to my dormant Gazelle library (http://www.gazelle-parser.org/) for
> LPeg/Bison-like text parsing.
>
> The vision is:
>
>   {C, C++, Lua, Ruby, Python, _javascript_, etc.} x
>   {Protocol Buffers, JSON, Thrift, Avro, Regexes, Text Parsing} x
>   Highly optimized C+JIT encoders/decoders

Speaking of that, does anyone know about Thrift
implementations/bindings for Lua? I've been asked about that recently
and couldn't find any.

-- Hisham