[OT] Re: Third draft (was Re: defs files)



> I think language bindings should work as follows:
>  - whenever possible, use runtime information
>  - failing that, autogenerate the code from the latest defs file
>  - failing that, manually write the code
> 
> The "thicker" a wrapper is, the more manual code is required. For
> example, Gtk-- requires a lot of manual code. Sugar requires only 20
> lines or so of manual code.

I am not sure I would call gtk-- a lot of manual code.  It is
only 4.5k manual lines with 15k auto generated lines.  Not bad
for a library wrapping every function with type conversions and
deriving every gtk+ class.  Considering we are wrapping a library 
with 127k lines that is only 4%.  :-)  

There are a lot better choices for thick wrappers.  wxGTK 
25K gtk lines (128k total!), or Vdk with 13k lines.


> A wrapper that compiles statically (like most C++ wrappers) can't
> really use the runtime information so needs to autogenerate signals,
> etc. from the defs file.

I think there are a lot more languages are statically compiled
like Pascal and Fortran.  No need to single C++ out.  ;-)

--Karl



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