This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB and scripting languages - which


> From: Jim Blandy <jimb@codesourcery.com>
> Date: Mon, 12 Feb 2007 09:25:09 -0800
> 
> There's a lot about Lua I like.  However, it doesn't have exceptions.

I think you are mistaken: Lua does have exceptions, it just calls them
``fallbacks''.

> My personal three language essentials are:
> 
> - type-safety (programs get errors, not segfaults)
> - automatic storage management (I don't need to call 'free'), and
> - exception handling (I don't need to check for an error return code
>   if my response will be to simply report it up to my caller)

By type-safety, do you mean that variables can hold different types of
objects, and programs that apply operators to operands of wrong types
are treated gracefully, then I think Lua qualifies.

Anyway, two advantages of Lua are:

  . It was designed from ground up to be primarily an extension
    language, not a general-purpose language that just happens to have
    C bindings for its interpreter; therefore it is small and
    efficient (by a large factor compared to Tcl, for example).

  . It's typeless and generally lacks the clutter that more
    ``complete'' programming languages require: type declarations,
    memory allocations, initialization before use, etc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]