On Mon, Nov 7, 2016 at 7:15 AM, Peter Bortas <bor...@gmail.com> wrote:
> Chris: What you have seem generally useful, but it lies in a namespace
> that will get a bit busy if we implement all the special cases as we
> think of them. I have similar function not checked in that would
> confuse users if we both committed. No in the least because I find
> exceptions useless for most smaller scripts unless I just plan on not
> catching anything. Which means my scripts are full of very similar
> code but where the functions return 0 on failure, not throwing, but
> dumping the failure pretty-printed to the console. Something I've also
> been planning to Process for a while, but not come up with a set of
> functions that doesn't make it confusing for users to choose among all
> the stuff.

Since this is of interest, I've rebased the branch onto current 8.1,
so we have a clean starting point for discussion.

> As I see it there are a few things that should happen in regards to
> external process spawning:
>
> 1. Can we come up with an almost as easy to use API as Process.run
> that plays better with memory and latency?

My first thought along those lines is to have something that returns a
pipe or buffer for stdout. Maybe a specially-enhanced one that also
deals with the return value?

Ideally, it should have a single return value that can be used
directly for the most obvious usage, which is receiving stdout.
Receiving stderr and/or the return value would ideally be possible,
but if that isn't possible, I don't mind a convenience function that
you have to set aside when you want more control.

More of a brainstorm or stream-of-consciousness than an actual theory,
but that's my thinking.

ChrisA

Reply via email to