Re: [gnet] Re: GIOChannels, GNet, GOIO



On Fri, May 14, 2004 at 06:12:32PM -0500, James M. Cape wrote:
> Well, the standing policy is that no duplicate functionality goes into
> the GNOME platform without deprecating the existing means, so this means

	This depends on whether the functionality is a pure duplication.

> Perhaps the plain "IO source watching" functionality could be exposed as
> a simple GSource, which is in turn used by the IOstream object. Then
> those who merely want source watching can get it without the baggage of
> an object, whereas those who want to use a stream object can use one.

	I'm not worried about the mere allocation of a GObject.  I'm
quite comfortable with that, in fact.  What I am worried about is a
stack of these things, forming a nice tower of code passing that is, in
a word, awful.  SysV STREAMS is my example.
	Consider the simple "here's my fd, please watch in GMainLoop
and let me call read_chars() in my callback".  In GIOChannel, there is a
GIOChannel structure allocated, it happily registers your callbacks, and
g_io_channel_get_chars() does the right thing (mere copy to your buffer
if you turn off encoding conversion).
	If a GOIO object is similar in its intrusion, there will be no
problem.  But if it is significantly larger (alloced size or codepath),
or if I have to create a stack of the things, I'm going to be unhappy.

Joel

-- 

"The lawgiver, of all beings, most owes the law allegiance.  He of all
 men should behave as though the law compelled him.  But it is the
 universal weakness of mankind that what we are given to administer we
 presently imagine we own."
	- H.G. Wells

			http://www.jlbec.org/
			jlbec evilplan org



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