"Nic Ferrier" <[EMAIL PROTECTED]> writes:
> There is a need for long term thinking but anyone who does it is only
> going to produce decent ideas by downloading the HURD and working out
> what it might be good for and what it might need to make it great in
> other areas.
There seems to be some assumption that long-term thinking has been
lacking. There are a lot of good ideas that represent long-term
thinking. Most of them are not written down, but that's because they
aren't yet solid enough, and experience shows that any details will be
totally different from the current ideas, by the time they get
implemented.
Troels's evidence for "lack of design" is that
1) sometimes functions are placed inside other functions and sometimes
they aren't.
2) some functions take an absurd number of arguments and some don't.
3) some of the arguments types are typedefed away.
4) the way everything is right now, is wrong
5) there sometimes seem to be a hard-to-get or no logic in the design
of the interfaces.
Taking these in order:
* Sometimes functions are placed inside other functions and sometimes
they aren't.
Functions are nested when there is a reason; that's usually because
the interior function needs access to local variables of the enclosing
function. That happens when the interior function is being passed to
some iterator, and therefore is restricted in what arguments it can
take. Occasionally it makes the code cleaner in other ways as well to
nest functions. I'm not sure whether Troels thinks functions should
be always nested or not.
* Some functions take an absurd number of arguments and some don't.
Each function in the Hurd takes the right number of arguments, neither
more nor less. I'm not entirely sure what this objection really
means. It's a little like saying "there are too many additions in the
code; there ought to be more subtractions to balance it out."
* Some of the arguments types are typedefed away.
Yes. Some are not; it depends on the specific case what the right
thing is.
* The way everything is right now, is wrong
What *does* this mean? What specifically is currently wrong that
should be right, Troels? I can think of some things, but I'm more
interested in hearing your list.
* There sometimes seem to be a hard-to-get or no logic in the design
of the interfaces.
Different interfaces have different logic. Some people believe in a
cookie-cutter approach to programming, in which you pick a style of
interface, and you make all the interfaces look like that. I don't
believe in that approach. I believe that the style of interface
should change as the thing being interfaced changes. This requires
care and discretion; it makes programming more of an art than a
science, and it means that people have to work a little harder to
learn the interfaces because they can't lazily assume that they will
be just like all other interfaces.
The interfaces to the core Hurd libraries were rather carefully
thought out; libports and libpager being two of the finest examples.
And libps and libpipe are also excellent examples. The libdiskfs
interface is pretty good, but has a few historical warts that might be
cleaned up some day, but it's not clear what good that would really
accomplish.
I would encourage people who find something to be confusing to pick a
thing (a small thing!) and say "tell me why this was designed this
way" and "how does this work". I will see such things and write nice
long emails explaining the ins and outs of them.
Thomas