Re: Plans for 2.8 - GNOME Managed Language Services?

On Fri, 2004-03-26 at 17:07, Havoc Pennington wrote:
> I don't know, basically just look at how we can better automate bindings
> along the lines of XPCOM/UNO. Add some cheesy component-system style
> features to GObject.
> I'm looking for practical easy steps forward here.

I don't think code generation is appropriate for complex languages, like
Ruby for instance.

In Ruby-GNOME2 we don't use generated code at all.  We prefer writing
almost all the API manually, to provide a 100% Ruby compliant API.

(some stuff are automatically generated at runtime, like properties
accessors, signals, enumerations/flags, GObject inheritance, etc... but
the rest is done by hand)

Just as an example, with Ruby/GStreamer you can actually do this:

	src = Gst::ElementFactory.make('filesrc')
	src.location = "/tmp/foo.mp3"
	dec = Gst::ElementFactory.make('mad')
	sink = Gst::ElementFactory.make('osssink')

	src >> dec >> sink

	pipe =
	pipe.add(src, dec, sink)
	# ...

	pipe.each_element { |element| ... }

And with Ruby/Libgda:'my_datasource') do |conn|
		# the connection will be automatically
		# disconnected at the end of this block

Of course there are similar issues with other libraries, such as
Ruby/GTK, Ruby/Libglade, etc...

This kind of stuff is impossible to have with generated code.


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