[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: two changes I'd like to see in version 3.1
- From: Steve Dekorte <steve@...>
- Date: Tue, 23 Jun 98 00:24:36 -0700
>There are two changes I'd like to see in Lua, both of which would make
>it a little easier to connect C code to Lua.
>
>I try to be careful in my code to use const char * when I know I'm
>dealing with immutable strings. Unfortunately, many Lua functions use
>parameter types of char *, even when const char * would be correct, so
>I get a slew of warning messages. It would be nice if the signatures
>were updated properly. I believe that *all* strings are immutable in
>Lua, so that all instances of char * could be replaced with const
>char*.
I agree. I've been bitten by that before.
>The other change I'd like to see is minor: I'd like the C version of
>lua_error to have the same signature as printf. This should
>relatively easy to implement in ANSI C using <stdarg.h> and vsprintf.
Speaking of errors, I wish there was a seperate error reporting mechanism
and api for parse errors. Requiring the debugger to parse the parse error
makes for a fragile interface.
Steve