On Wed, Jun 18, 2008 at 03:37:00PM -0700, Frederik Eaton wrote:
>> I'm sorry for my late reply. This all sounds reasonable. My only concerns are
> that deprecating the old interfaces seems like a declaration of intent to
> eventually remove them. I believe that to the extent possible, library
> development should start with simple low-level interfaces which expose
> OS-level functionality in a straightforward manner, and then build on top of
> them. I realise that running processes is an especially difficult area,
> because different operating systems have different interfaces, there is the
> possibility of pipes and so forth. Perhaps this is why we have gone through
> multiple iterations of process-running APIs in the Haskell standard
> libraries. But I think that especially low-level interfaces like these
> should be created with the understanding that they will stay around forever,
> even if the cumulative result is slightly ugly. That can be an incentive to
> get them right the first time.
>> In my mind, if 'createProcess' could not be implemented via the old
> interfaces, then that means they weren't low-level enough to start with. And
> in that case, we should be working on providing better low-level interfaces,
> rather than new high-level ones (I think 'createProcess' is slightly
> higher-level than 'runProcess' because it has a notion of a shell, pipes,
> fancy data structures, etc.). On the other hand, if 'runProcess' and friends
> were sufficient to implement 'createProcess', then that means they provided
> a satisfactory low-level foundation. And I think low-level interfaces are
> built upon, not deprecated.
No, createProcess is more low-level than the previous interface, which
is why it can't be implemented using the previous interfaces, but
rather they can be implemented using createProcess. Which is why they
can be deprecated, although I'd hope they won't be removed for at
least a couple more ghc releases after createProcess is introduced.
David